This repository was archived by the owner on Nov 15, 2026. It is now read-only.
Repository navigation
feat: save a page from the phone with a bookmarklet - #10
Merged
Merged
Conversation
The bookmarklet navigates the tab to /read/save?url=&title=. The save page shows the page as text and saves only on the owner's tap, through later.save on the app's own lodge session. later.save takes an optional title, cleaned and cut to 300 runes; the URL is still checked with fetch.Check (ADR-0003). /bookmarklet hands out the code and the install steps for iOS Safari. ADR-0006 is Proposed. schema/rpc/read.yaml, which api/read.go names, is written for the read domain.
1 task done
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Save a page to Read later from the phone with a bookmarklet (Brian's choice, 2026-10-21). This is night-shift goal 2 of 3, from Odrade.
How it works
https://LODGE/read/save?url=…&title=…. lodge's browser checks accept a top-level navigation to a shell page from any site. The shell opens Read's frame at that route, with the query string kept.later.saveon the app's own lodge session. The daemon still checks the URL withfetch.Check(netguard, ADR-0003), sojavascript:,file:, loopback, private, tailnet (*.ts.net) and homelab (*.local, single-label) addresses are refused.There is no token in the bookmarklet, and the visited page never calls lodge. The code is built from the frame's own origin, so no host is written into the bundle.
Changes
later.savetakes an optionaltitle. The daemon removes control characters, collapses white space, and cuts it to 300 runes. An empty title becomes the host name, as before. MCPsave_urlandreadctl savepass no title./savepage;/bookmarkletpage ("Save from your phone", linked from the sidebar), with the link to drag, the code with a Copy button, the install steps for iOS Safari, and the desktop steps;MAX_ROUTE).specs/api.md: thetitleparam, and a new Web routes section with the exact bookmarklet code;design/overview.md;docs/README.mdandREADME.md.api/read.gonamesschema/rpc/read.yaml, but that file did not exist. It is now written for the read domain, withlater.save'stitle.Tests
127.0.0.1,192.0.2.1,[::1],lodge.example.ts.net,nas.local,routerandjavascript:, with nothing stored;<b>stays text, nothing is saved before the tap, and errors show inrole="alert");Gates on a laptop:
make check,make race,make web-fmtandmake web-check(16 files, 84 tests) all pass. I also checked both pages on a 390 px viewport in vite dev with the mock transport. I ran the generated bookmarklet in Chromium: it built/read/save?url=…&title=…, and that address opened the save page and saved the item.Deploy (after Brian merges)
These are the same steps as the #9 redeploy:
sshto the host, thenincus execinto the hub VM as root.On a laptop, from
mainat the merged commit:In the VM, make a rollback archive first, then install:
To roll back:
There is no schema migration, so the database needs no rollback.
Live check
https://LODGE/read/save?url=https%3A%2F%2Fexample.com%2F&title=Example. Check that the page shows "Example" andexample.com, then tap Save. It must show Saved, and the item must be in Read later.https://LODGE/read/save?url=http%3A%2F%2Fnas.local%2F. Tap Save. It must show "Read does not fetch addresses inside your network …" and save nothing.