Repository navigation
List the relics this browser holds on the homepage - #97
Merged
Merged
Conversation
- Refactor landingPage to conditionally emit client script, mount, and script-src CSP for GET / - Keep /install byte-identical to shared landing copy without client script or mount - Add contract styles for home relic list using existing tokens - Repin tests for mount placement, single script tag, CSP boundary, and copy parity - Add /assets/home.js and smoke assertions to deploy workflow
…tive/relic into feat/home-relics-list
…ve/relic into feat/home-relics-list
The comment above landingPage claimed the missing connect-src makes the list structurally unsendable. It refuses the request APIs; it does not govern navigation or same-origin images, so say that. home.js now calls the renderer directly, guarded against the partial document stub the viewer tests install. /install keeps its blank line.
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
The relics a reader has opened are only listed on
/dashboard. The homepage, which is also the installed app'sstart_url, shows install copy and nothing of theirs.Change
/lists the relics this browser holds keys for, in a "Your relics" section after the lede, newest opened first. Each row is the relic's kind and its title, linking to/{id}#{key}. A link at the bottom points to/dashboardfor backup, forget, and relics you only commented on.viewer.tsintorelic-rows.tsso the homepage bundle does not pull in sucrase). It makes no request: no session check, no/api/auth/relics./is the static page./assets/home.js, 7.4 KB, built separately from the viewer. The service worker does not cache it, so a new version reaches readers on the next load./CSP gainsscript-src 'self'and still has noconnect-src, so fetch, XHR, WebSocket, EventSource and beacons fall back todefault-src 'none'. That is a backstop rather than a wall: it does not govern navigation, and same-origin images still load. What keeps the list in the browser is the script we serve./installkeeps today's body and its script-free CSP. The only difference is 70 lines of inert CSS from the shared template./runs no script" and "no my relics list" rules. The reversal is recorded indocs/frame.md,docs/spec/viewer.md(6.4, 6.6, 6.7),docs/decisions.mdanddocs/design/operations.md, with the cost stated./assets/home.js, that/references it, and that/installhas no script.Proof
The real server and real built assets in headless Chromium. Four vault entries were seeded in localStorage.
hidden,display: none, no children.#r1...key yields one#. A missing title falls back to the id. A long title clips to one line with an ellipsis. The section sits between the lede and "How it goes"./installwith the same storage: no section, no script./with JavaScript disabled: no list.bun run verifypasses (lint, typecheck, 1476 tests). The new server and client tests were each run against the old source or a deliberately broken one, and failed.