Repository navigation
feat(server): a guest sees a project's favicon, served by J5 - #591
Merged
Jacksondr5 merged 1 commit intoOct 13, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Jacksondr5
added a commit
that referenced
this pull request
Oct 13, 2026
6 of 8 tasks
7 of 8 tasks
Jacksondr5
force-pushed
the
j5code/share-3d-project-favicon
branch
from
October 13, 2026 04:00
6c652b6 to
785ba91
Compare
Jacksondr5
force-pushed
the
j5code/share-3d-project-favicon
branch
from
October 13, 2026 04:09
785ba91 to
3f6b07f
Compare
Jacksondr5
force-pushed
the
j5code/share-3d-project-favicon
branch
from
October 13, 2026 04:16
3f6b07f to
e1123fb
Compare
Jacksondr5
force-pushed
the
j5code/share-3d-project-favicon
branch
from
October 13, 2026 04:17
e1123fb to
1420312
Compare
Jacksondr5
force-pushed
the
j5code/share-3d-project-favicon
branch
from
October 13, 2026 04:28
1420312 to
b4c969c
Compare
Jacksondr5
force-pushed
the
j5code/share-3d-project-favicon
branch
from
October 13, 2026 04:30
b4c969c to
7924d24
Compare
Jacksondr5
force-pushed
the
j5code/share-3d-project-favicon
branch
2 times, most recently
from
October 13, 2026 04:36
faa7532 to
6d1bf35
Compare
Jacksondr5
force-pushed
the
j5code/share-3d-project-favicon
branch
from
October 13, 2026 04:41
6d1bf35 to
eadf3cf
Compare
Jacksondr5
force-pushed
the
j5code/share-3d-project-favicon
branch
from
October 13, 2026 04:54
eadf3cf to
704423b
Compare
Jacksondr5
force-pushed
the
j5code/share-3d-project-favicon
branch
from
October 13, 2026 04:58
704423b to
ae942d8
Compare
Jacksondr5
force-pushed
the
j5code/share-3d-project-favicon
branch
from
October 13, 2026 05:31
ae942d8 to
3ed8990
Compare
Jacksondr5
force-pushed
the
j5code/share-3d-project-favicon
branch
from
October 13, 2026 05:40
3ed8990 to
c82f198
Compare
A guest saw upstream's default icon for a project whose icon is a favicon file. Upstream's client asks for a favicon by the project's folder, and the link upstream signs for it carries that folder in readable base64, so a guest could be given neither. A guest's reduced project now names itself by id where a favicon's path would be. The guest gate reads the id from the request, checks the project is in the guest's sidebar, and answers with a link to a J5 route signed by J5 that names the project id and an expiry only. The route serves the file through upstream's own favicon resolution and asset serving. No upstream file is edited. Refs #535 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Jacksondr5
force-pushed
the
j5code/share-3d-project-favicon
branch
from
October 13, 2026 05:53
c82f198 to
0fbe8b0
Compare
7 of 8 tasks
Jacksondr5
marked this pull request as ready for review
October 13, 2026 20:39
|
Warning Review limit reached
This review includes 13 billable files and costs up to $3.25.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 21 minutes for your next included review. View limit details
Comment |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
A guest sees upstream's default icon for a project whose icon is a favicon file. Upstream's client asks for a favicon by the project's folder on the host, and the link upstream signs for it carries that folder in readable base64, so a guest could be given neither. Jackson, 2026-10-12: "Have J5 serve the favicon." Part of #535.
What changed
J5-owned code only; no upstream file is edited.
guestIconPath(projectId)asfaviconPath: the project's id in the shape of a relative image path (j5-shared-project/<id>.png). Upstream'sProjectFavicon(web and mobile) sendsfaviconPathback as the request'spath, so the request now says which project it is about.assets.createUrlwith aproject-faviconwhosepathnames a project, the rule checksPersonAccess.projectInFeed(a grant on the project, or a thread the guest can see lives in it) and answers in place of upstream's handler with a link to J5's route. The link is signed with J5's own key and holds the project id and an expiry, nothing else. Its file name is a hash and the favicon's extension.GET /api/j5/sharing/project-icon/<token>/<name>takes no sign-in, as upstream's asset route takes none (an<img>cannot send one). It finds the project by id and serves the file through upstream's exportedissueAssetUrl,resolveAssetandassetFileResponse, so the favicon search, the check that the file is inside the project, and the response headers (no sniffing, SVG sandboxed) are upstream's.projectFaviconUrlto each entry of a link that works: the J5-signed link above, when the project has a favicon and no chosen icon, andnullotherwise. A link that does not work gets its 404 before anything is resolved. It needed one call into this layer and nothing new, and the holder of a working link could pair and be given the same link anyway. A link that does not work is told nothing.project-favicon-missingmarker, which upstream's client reads as "draw the default" and never fetches.A member's connection is untouched: the guest rules are not installed for it.
UI changes
No client code changed; the guest's sidebar and thread header now draw the favicon.
Decisions to check
faviconPathcarries the project id for a guest. This is the one design choice Jackson may want to see. It needs no upstream edit and does not changeworkspaceRoot. The alternatives were an edit inside upstream'sProjectFaviconon web and mobile, or putting the id in the reducedworkspaceRoot, which other client code reads. It also fixes a latent clash: upstream's client caches favicons by folder and favicon path, and every guest project has the same placeholder folder.GuestProjectIcons.tsprovides whatever is in the fiber, which is where upstream's own asset request and route run. If one were missing the answer is a refusal or a 404, never a wider read. The live test is what shows they are present on a real server.Live testing
Run by the builder on isolated
j5-live-testservers (--base d45a1101bdfor the layer below beside this branch at6c652b699f), with a guest paired through a real share link.project-favicon-missingmarker. After addingfavicon.svgand restarting, the request was answered with a J5 link; fetching it returned 200,image/svg+xml,x-content-type-options: nosniffand a sandboxingcontent-security-policy, with bytes equal to the file. The answer, the token (version,projectId,expiresAt) and the response headers held no host path or file name. A tampered link got 404. In the browser the guest's sidebar and thread header drew the favicon. On the layer below the same request was refused and the default icon showed.6d1bf35774): describing a join link for a thread whose project has a favicon and no chosen icon returned a favicon link; fetching it returned the file's bytes asimage/svg+xml; the answer held no host path. Three describes left the link unused. With a chosen icon set, the answer carried the icon and no favicon link. A revoked and a made-up link each got the same 404.j5/main(tip3ed8990140): a guest's browser askedassets.createUrlfor its project's favicon once and J5 answered it (oneguestProjectIcons.upstreamFaviconspan); the wider pass is described in feat(server): a member brings a guest in with a share link #582.Checklist
FORK.md(case text and file-table row) in this PR — none edited; case 69 describes the three upstream functions it calls and what to reread on an advancedocs/j5/product/upstream.md— D33AGENTS.md) — server only. Web and mobile share the client path; only web was looked at. Removing the grant refuses the next requestdocs/j5/product/and user docs rewritten where this changes them — none neededTests:
apps/server/src/j5/sharing/GuestProjectIcons.test.ts, through the real gate, upstream's real favicon resolution and asset serving, real files and a real database: an SVG and a PNG favicon served with upstream's headers; nothing handed to the guest naming a folder or file; a project not in the feed by id and by real folder; a made-up id; a guest with no person; nine tampered tokens; a link for one project asked for another's name; an expired link; a deleted project; no favicon; a member getting upstream's own handler. Upstream'sapps/server/src/assetstests pass unchanged.Claude Opus 5.5, Claude Code
🤖 Generated with Claude Code