Skip to content

improvement(favicons): resolve platform tenants no provider can see, retry timeout-derived icons, no miss flash - #9497

Merged
waleedlatif1 merged 4 commits into
stagingfrom
feat/favicon-platform-aliases
Oct 31, 2026
Merged

waleedlatif1 merged 4 commits into
stagingfrom
feat/favicon-platform-aliases

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Platform fallback: a tenant on a platform whose domains have no icon at either provider, at any parent the walk reaches, now ends its candidate walk at the platform's own site:

    • AWS access portal (awsapps.com)
    • Coupa (coupahost.com, coupacloud.com)
    • GitLab Dedicated (gitlab-dedicated.com, .systems, and its Pages domain .site, matching how gitlab.io already resolves)
    • Databricks (databricksapps.com, databricksapps.us, databricksapps.mil, azuredatabricks.net, databricks.us)
    • Okta preview (oktapreview.com)
    • TestRail Cloud (testrail.io)
    • UKG Pro (ultipro.com)
    • Jama Connect (jamacloud.com)

    Domain formats come from vendor docs or the Public Suffix List. Both providers were probed to miss every suffix, and every target resolves. Platforms whose parent already resolves (Salesforce, Databricks workspaces, Atlassian, ServiceNow, Workday) need no entry.

  • Self-hosted tools: hosts at <product>.<company domain> (gitlab, jira, confluence, grafana, jenkins, testrail) fall back to the product's icon. This only applies when every other candidate missed, only on an exact first label (so mygitlab. and docs.gitlab. don't match), and never under a Public Suffix List private suffix, which is where hosting platforms register, so gitlab.azurewebsites.net doesn't match. sentry is left out because the name collides with other products.

  • Ordering and exclusions: the platform always comes after the host's own walk, so a tenant's custom icon still wins. Generic hosting domains (herokuapp.com, azurewebsites.net, cloudfront.net) are deliberately excluded, and internal hosts still never leave the server.

  • Timeouts: a parent's icon reached only because a more specific lookup timed out is cached for a day instead of thirty, since the host's own icon may exist. The cached value records whether it was definite or provisional, so a host that reuses it inherits the shorter lifetime. In the audit below, provider latency flipped 5 of 72 hosts between their own icon and their parent's across runs. The day fits RFC 8767's 1–3 day bound on serving stale data.

  • Cached parent misses: a cached miss at a parent skips only the candidates that parent's own walk covered, so a product fallback derived from the original host is still tried.

  • No flash on remount: a failed icon is remembered client-side, in an LRU capped at 500 entries for the route's five-minute outage window (an <img> can't tell a miss from an outage), so a remounted icon renders its fallback without an empty frame. Confirmed misses stay in the browser's HTTP cache for the route's hour. Table rows already reserve a fixed icon slot, so there's no layout shift.

  • Cache key: moves to favicon:v3 so stale misses for newly mapped platforms clear on deploy. Only staging holds favicon cache entries today.

Type of Change

  • Improvement

Testing

  • Audit: ran the resolver's host walk and response classification over the 72 unique hosts of a real go-links export, against the live providers. Icons resolved for 53 hosts, up from 46, with none lost. The remaining misses are company-internal hosts and IP literals, where the fallback glyph is correct. Cold lookups took 91 ms at p50 and 578 ms at worst; repeat lookups are served from Redis and the browser cache.
  • Unit tests: lib/favicon/hosts.test.ts covers platform tenants, self-hosted products, lookalikes and hosting suffixes, internal hosts, platforms the walk already reaches, and no duplicate candidates. lib/favicon/resolve.server.test.ts runs the resolver against the shared input-validation and Redis mocks: provisional icons stay provisional through reuse, a cached parent miss still reaches the product fallback, and a definite icon is kept for a month. Both use made-up hosts only and were written red-first. 73 favicon tests pass, and 206 including the message-content suites.
  • Lint and audits: biome, check:test-patterns, check:source-conventions, check:client-boundary, check:boundaries, check:file-names, check:comment-hygiene, check:utils, check:test-patterns, check:source-text.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

…and retry icons chosen after a timeout

A tenant on a platform whose domain has no icon at either provider, even at the
parent (AWS sign-in portals, Coupa, GitLab Dedicated, Databricks apps, Salesforce,
Okta preview, UKG, Jama), and a self-hosted gitlab./jira./testrail. host, now end
their candidate walk at the platform's own site, after their own host and parents
so a tenant's custom icon still wins. A parent's icon reached only because a more
specific lookup timed out is cached for a day instead of thirty, since the host's
own icon may exist.
@vercel

vercel Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Oct 31, 2026 4:58am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

The PR adds platform icon fallbacks, shorter caching for timeout-derived icons, and a brief client-side memory of failed icons.

  • More platform tenants and self-hosted tools can show their product icon.
  • Timed-out host lookups keep parent icons short-lived.
  • Remounted icons show their fallback right after a failure.

Reviews (4) · Last reviewed commit: "chore(favicons): import resolver test mo..." · Reviewed by Greptile

Comment thread apps/sim/lib/favicon/resolve.server.ts Resolved
Comment thread apps/sim/lib/favicon/resolve.server.ts Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 4 files

Confidence score: 4/5

  • In resolve.server.ts, reusing a cached hit can lose its provisional status, keeping a fallback icon cached for 30 days instead of retrying after one day. Preserve that status when reading and reusing the hit.
  • In hosts.ts, a cached parent miss can stop walk before it tries the appended product candidate, so jira.company.com may miss the atlassian.com fallback. Continue past cached misses when candidates remain.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/sim/lib/favicon/resolve.server.ts">

<violation number="1" location="apps/sim/lib/favicon/resolve.server.ts:118">
P2: Preserve the provisional status when reading and reusing cached hits; otherwise a child lookup can cache a fallback icon for 30 days instead of retrying it after one day.</violation>
</file>

<file name="apps/sim/lib/favicon/hosts.ts">

<violation number="1" location="apps/sim/lib/favicon/hosts.ts:33">
P2: A cached parent miss can stop `walk` before this appended product candidate is tried, so `jira.company.com` may miss despite the `atlassian.com` fallback; continue past cached misses when later candidates remain.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/favicon/platforms.ts Resolved
Comment thread apps/sim/lib/favicon/resolve.server.ts Resolved
Comment thread apps/sim/lib/favicon/hosts.ts Resolved
…d keep misses from flashing

GitLab Dedicated instances live on gitlab-dedicated.com (and .systems pre-production);
.site is their Pages domain, kept to match gitlab.io. Adds coupacloud.com, databricks.us,
databricksapps.us, and testrail.io, each a suffix both providers miss at every level;
drops entries the parent walk already resolves and the self-hosted sentry label, whose
name collides with other products. A host with no icon is remembered client-side for the
route's miss lifetime, so a remounted icon shows its fallback without an empty frame, and
the cache key moves to v3 so stale misses for newly mapped platforms clear on deploy.
@waleedlatif1 waleedlatif1 changed the title improvement(favicons): resolve platform tenants no provider can see, and retry icons chosen after a timeout improvement(favicons): resolve platform tenants no provider can see, retry timeout-derived icons, no miss flash Oct 31, 2026
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

Comment thread apps/sim/components/favicon.tsx Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 5 files

Requires human review: Auto-approval blocked because this review re-detected 2 unresolved issues already reported by Cubic.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/components/favicon.tsx Resolved
Comment thread apps/sim/lib/favicon/platforms.ts Resolved
… past cached parent misses, skip hosting suffixes

A cached hit now records whether it was definite or provisional, so a host reusing a
parent's timeout-derived icon inherits the one-day lifetime instead of a month. A cached
miss at a parent skips only the candidates that parent's own walk covered, so a product
fallback derived from the original host is still tried. The self-hosted product label
no longer applies on a Public Suffix List private (hosting) suffix. Adds the Databricks
military suffix the repo already recognizes, and the client remembers a failed icon only
as long as the route retries an outage.
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 7 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 7 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 79a7aa1 into staging Oct 31, 2026
69 checks passed
@waleedlatif1
waleedlatif1 deleted the feat/favicon-platform-aliases branch October 31, 2026 06:11

This branch was previously deployed

1 inactive deployment
Preview — ebd362e5 Deployed Oct 31, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant