Repository navigation
fix(ui): show local project icons in the chat header - #122406
Conversation
Prepare project icon bytes during chat startup and serve only the process-stable snapshot. Keep all filesystem work asynchronous and lift the breadcrumb trail onto the topbar's optical axis.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Drop the IDE-specific icon convention so every candidate remains an explicit web project path.
|
Codex review: found issues before merge. Reviewed August 11, 2026, 11:24 PM ET / August 12, 2026, 03:24 UTC. ClawSweeper reviewWhat this changesThe PR prepares local project icons during chat startup, expands favicon locations, serves cached snapshots to the chat header, and lifts breadcrumb alignment by one pixel. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open: the startup-prepared snapshot is directionally sound and the PR includes credible visual proof, but it regresses current icon conventions and makes the bounded session cache insertion-ordered rather than LRU. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway resolves a chat session’s local workspace icon before replying to chat startup, then an authenticated asset route provides those bytes to the Control UI header. The header falls back to a folder glyph when no icon is available. flowchart LR
A[Chat startup] --> B[Workspace icon preparation]
B --> C[Session icon snapshot]
C --> D[Authenticated asset route]
D --> E[Chat header]
B --> F[Folder fallback]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +66, Tests +77. Total +143 across 5 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the startup-prepared snapshot design, retain all currently accepted icon paths unless an explicit deprecation is approved, and refresh session-snapshot recency on successful reads. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main accepts apple-touch and static favicon locations, while the PR removes them and explicitly tests apple-touch as rejected. Is this the best way to solve the issue? No: preparing immutable bytes at chat startup is the right hot-path boundary, but the branch should preserve existing conventions and use LRU reads for the bounded session cache. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b024f01171b4. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Restore existing web icon paths and refresh bounded session snapshots when they are served. Keep the IDE-specific path excluded per the final product decision.
|
Pre-merge verification for
|
|
Merged via squash.
|
* fix(ui): resolve project icons from deterministic paths Prepare project icon bytes during chat startup and serve only the process-stable snapshot. Keep all filesystem work asynchronous and lift the breadcrumb trail onto the topbar's optical axis. * fix(ui): keep project icon paths web-focused Drop the IDE-specific icon convention so every candidate remains an explicit web project path. * fix(ui): preserve project icon compatibility Restore existing web icon paths and refresh bounded session snapshots when they are served. Keep the IDE-specific path excluded per the final product decision.
What Problem This Solves
Fixes an issue where users opening a project chat would see the generic folder mark even when the project already provides a conventional local favicon. It also fixes the project breadcrumb sitting slightly below the sidebar and search controls in the chat topbar.
Why This Change Was Made
The Gateway now resolves the first valid icon from one short, deterministic list of literal paths, in this exact precedence:
There is no recursive search or dynamic scoring. Multiple matches always resolve by this fixed order; invalid or absent candidates continue to the next literal path, and a project with no valid match keeps the folder fallback.
Performance contract:
chat.startupprepares the icon snapshot once when the project chat opens. The authenticated asset route performs zero filesystem/session-store discovery per request and never freshness-polls.stat/realpath/reread work.statSync,readFileSync,existsSync, orcloseSync.The breadcrumb trail also receives a one-pixel optical lift as a unit, keeping the project icon, labels, and separator aligned with the topbar action glyphs.
User Impact
Projects with an icon in one of the listed local locations now show their own identity in the chat header. ClawHub resolves
public/favicon.ico; OpenClaw resolvesui/public/favicon-32.png; projects without an icon continue to show the generic folder. No remote icon fetch is introduced.Evidence
All screenshots were captured on Testbox from head
6fc0eed28dcat the same 760×520 viewport. Each image is a tight crop of the rendered chat topbar, including sidebar/search controls for axis comparison.public/favicon.icoui/public/favicon-32.pngRemote focused validation:
The Gateway tests remove the selected file after preparation and confirm that later HTTP requests still serve the original cached bytes without invoking session-root resolution again. They also prove that serving a session refreshes its recency so a 129th insertion evicts the oldest inactive snapshot, not the actively read one. The E2E asserts the action glyph centers and the breadcrumb's one-pixel optical offset in both themes.