GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(server): resolve a later local project favicon when an earlier icon link is not a local file by only21mil · Pull Request #42023 · pingdotgg/t3code

Conversation

@only21mil

@only21mil only21mil commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Problem

When a project's index.html or root route file lists a data: icon, an https: icon, or a missing file before a local icon such as <link rel="icon" href="/brand/logo.svg">, the project shows its letter monogram instead of that icon. The resolver tried only the first icon href. A long base64 data: icon also made stat fail with ENAMETOOLONG, which errored the whole lookup.

Change

The resolver now collects every icon href in document order (HTML <link> tags first, then route object literals, as before) and uses the first one that names an existing file in the workspace, so an earlier existing icon still wins. Hrefs with a URL scheme (data:, https:) or a protocol-relative //host are skipped, since they never name a project file. A path that runs through a file (ENOTDIR) or a symlink loop now counts as missing, as NotFound already did, whether it is a candidate, a source file, or a cached icon checked again. That applies to every favicon candidate, not just source hrefs.

Scope

A small fix for an obvious server bug in ProjectFaviconResolver.ts, so it has no issue. No client or contract changes.

Verification

Setup: Linux, web client in T3 Code's Browser panel at 1280×800, light theme, a fresh dev server process (vp run dev --no-seed) and browser origin for each commit, server labelled "Test machine". The Brand Demo fixture's index.html lists a percent-encoded data: SVG icon, an https: icon, then /brand/logo.svg, with public/brand/logo.svg present and no favicon.* file.

Steps: add the fixture project → start a Replay (dev) thread in it → open the thread.

c9e22e5ff42 (main) ae84e41b005 (this PR)
Brand Demo shows its letter monogram in the sidebar and breadcrumb. Brand Demo shows its own logo.svg in the sidebar and breadcrumb.
Brand Demo shows its letter monogram in the sidebar and breadcrumb. Brand Demo shows its own logo.svg in the sidebar and breadcrumb.

An AI agent ran vp test run src/project/ProjectFaviconResolver.test.ts. The updated cases fail on c9e22e5ff42 (the HTML case with ENAMETOOLONG, the route case finds no icon) and pass 3 of 3 runs on ae84e41b005. They also pass on a local merge with main at a891304c84b, which merges cleanly and leaves both changed files identical. vp run check:changed passes.

What the tests cover
  • An index.html listing a 5,000-character base64 data: icon, an https: icon, a missing file, a //host icon that matches a local file, and a path through a file, then /brand/logo.svg and a later existing /brand/late.svg. It resolves logo.svg. When public then becomes a file, the next lookup falls back to web/favicon.png instead of failing.
  • A route literal with an https: icon before a local one.
  • A root-relative /brand:v2.svg, which stays a path (skipped on Windows, where : is not allowed in file names).
  • The tests fail if the scheme check, the // check or the ENOTDIR skip for a candidate, a source file or a cached icon is removed, if either href list stops at its first entry, if candidates are tried in reverse, or if the scheme check runs after the leading / is stripped.

Links

  • ProjectFaviconResolver.ts and its test

Not shown

  • The ENAMETOOLONG error from a long base64 data: icon is shown by the test only.
  • Desktop and mobile clients load the same server-resolved icon.

Generated with Claude Opus 5.5 in T3 Code Nightly

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@only21mil
fix(server): resolve a later local project favicon when an earlier ic…
ae84e41
…on link is not a local file
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Nov 24, 2026
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The favicon resolver now checks multiple icon hrefs in order, ignores external URLs, and treats BadResource errors as missing resources. Tests cover icon selection, cached-path fallback, and route-metadata resolution.

Changes: Favicon Resolution

Layer / File(s) Summary
Ordered icon resolution and missing-resource handling
apps/server/src/project/ProjectFaviconResolver.ts, apps/server/src/project/ProjectFaviconResolver.test.ts
The resolver extracts icon hrefs and checks local candidates in order while skipping external and protocol-relative URLs. It treats BadResource errors during candidate lookup, source access, and cached-path validation as missing resources. Tests cover candidate selection, fallback, and route metadata.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: juliusmarminge, bramley-jetcharge

Merge Risk: Minimal · up to f4ebe

This fixes favicon selection so that a later local icon is used when an earlier icon link is not a local file. No concrete merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the resolver now picks a later local favicon when an earlier icon link is not a local file. It matches the objectives and the raw summary, which describe collecting ev…
Description check Passed The description follows the template. It has Problem, Change, Scope, and Verification sections, and each one has real content. The Verification section lists the tests, the before and after comparison…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the resolver now picks a later local favicon when an earlier icon link is not a local file. It matches the objectives and the raw summary, which describe collecting every icon href and skipping URL-scheme hrefs.

Full details: Description check

Explanation

The description follows the template. It has Problem, Change, Scope, and Verification sections, and each one has real content. The Verification section lists the tests, the before and after comparison, the commit hashes, and the checks that were run. The author also states what was not shown. The template comment asks for a model and harness line, and the description includes one (Claude Opus 5.5 in T3 Code Nightly).

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: 110ed77
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4254b671-1638-4f8c-b0dd-73f411941df1
Commits

Reviewing files that changed from the base of the PR and between ae84e41 and f4ebe39.

Files selected for processing: 2

  • apps/server/src/project/ProjectFaviconResolver.test.ts
  • apps/server/src/project/ProjectFaviconResolver.ts
Files with no reviewable changes: 1

  • apps/server/src/project/ProjectFaviconResolver.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 24, 2026
juliusmarminge and others added 2 commits November 24, 2026 09:03
@juliusmarminge
Merge remote-tracking branch 'origin/main' into fix/server-favicon-fa…
2c77a45
…llback-later-icon-link
@juliusmarminge @claude
refactor(server): fold the favicon BadResource fallback into one helper
f4ebe39
Keeps the exported optionOnNotFound unchanged for AssetAccess and drops a
colon-path test the scheme check could not break.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). and removed size:S 10-29 changed lines (additions + deletions). labels Nov 24, 2026
@juliusmarminge

juliusmarminge commented Nov 24, 2026

Copy link
Copy Markdown
Member

Evidence

Scenario: Later local icons survive earlier unsupported icon links

Created the three reported synthetic git projects, each containing the same red/yellow SVG. Seeded Replay (dev) multi-turn threads, opened each thread, inspected sidebar and breadcrumb icons, then opened the Projects picker. Environment: Linux Chromium, 1280×800, light theme, fresh isolated databases on both commits.

Proven: the scenario fails on base 110ed776c9 and passes on head f4ebe39f47.

Before — 110ed776c9 After — f4ebe39f47
Result HI/RI monograms; assertion failed Local logos; passed
HTML later icon Before: HTML later icon After: HTML later icon
Root-route later icon Before: root-route later icon After: root-route later icon
Control first icon Before: control first icon After: control first icon
Project picker Before: project picker After: project picker
Failure capture Base assertion failure

Scenario source

Before recording · After recording

Not shown:

  • ENAMETOOLONG from a long data URL and ENOTDIR from a path through a file were not exercised; the scenario follows the reported three-project reproduction.
  • Missing-file fallback and priority among multiple existing local candidates were not exercised; each reproduced project contains only one declared local icon candidate.
  • Desktop, mobile, remote/relay and tunnel clients were not exercised; evidence covers the real local web client and server.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass and removed takeover:in-progress A takeover lead is working on this PR labels Nov 24, 2026
@juliusmarminge
juliusmarminge merged commit 6f15610 into pingdotgg:main Nov 24, 2026
54 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Nov 24, 2026
@patroza patroza mentioned this pull request Nov 24, 2026
Merge upstream main through 26f4c7550e7a patroza/t3code#673
Merged
This was referenced Nov 24, 2026
fix(server): resolve percent-encoded local favicon hrefs #42314
Merged
fix(server): resolve relative favicon hrefs from src/index.html #44186
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@only21mil @juliusmarminge
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.