-
Notifications
You must be signed in to change notification settings - Fork 0
SPEC-46 P1: Docs screen, preview, and tailnet publishing #158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 30 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
d627c22
SPEC-46 P1a: the doc index's security boundary and title extraction
leduckhc a013c07
SPEC-46 P1b: freeze the docs wire contract
leduckhc fbb4ffc
SPEC-46: correct the mockup's published URL to a capability URL (D9)
leduckhc 0398c1b
SPEC-46 P1c: the docs index, grants, and the publish route (server)
leduckhc c997331
SPEC-46 D10/D15 rev 2: bind the doc port lazily, and only on the tailnet
leduckhc 60426fe
SPEC-46 P1d: the Docs screen, markdown preview, and publish sheet (app)
leduckhc 3568d08
SPEC-46 P1e: re-index docs when the worktree list arrives
leduckhc 4992ed7
SPEC-46: let the P1e regression test type-check
leduckhc ec85d44
fix(qa): stop offering --lan as a remedy publishing cannot use
leduckhc 800f829
fix(qa): let the title lead the doc preview, not the front-matter chips
leduckhc 00317d0
feat(docs): index every doc git does not ignore, and make the list na…
leduckhc 55f1b93
docs(mockups): the docs popover searches, scrolls and caps (rev 2)
leduckhc c10fbb8
fix(qa): unwrap the grant object from docs.publish ack
leduckhc a84fde7
test(docs): pin the docs.publish ack shape that broke HTML preview
leduckhc e169f53
docs(spec): D8 rev 2 — where the viewer is decides how HTML opens
leduckhc 8495844
feat(docs): open HTML on the host when the viewer is already there (D…
leduckhc ed52315
fix(qa): three high-severity bugs from ocr review
leduckhc 7439808
fix(security): use powershell Start-Process instead of cmd /c start o…
leduckhc 20a1cd8
refactor(docs): fix 13 ocr audit findings, restructure scan and listener
leduckhc 07e786b
fix(docs): the bugs the ocr review found, with tests that bite
leduckhc 402bd8b
fix(docs): defensive error handling in scan loop
leduckhc ff18056
docs: SPEC-46 P1 branch summary for review
leduckhc 40f42a9
fix(docs): add the ocr findings that didn't make the previous commit
leduckhc 749a962
fix(docs): five medium-severity audit findings from ocr review
leduckhc 00fa467
fix(docs): the medium-severity ocr findings worth fixing
leduckhc 072eeff
merge main: SPEC-46 P1 + ports features
leduckhc 5089d52
fix(test): re-sync the shared snapshots fixture after the main merge
leduckhc fb14296
Merge origin/main (#157) into feat/serving-html
leduckhc fca3ed8
fix(docs): migrate from snackbar to StatusCenter (SPEC-48)
leduckhc 657a7f1
fix(qa): route doc link copy through StatusCenter, not showSnackBar (…
leduckhc 89c8e48
fix(docs): address CodeRabbit review on SPEC-46 P1
leduckhc 6892bd0
fix(docs): the published URL is plain HTTP on the tailnet IP, not https
leduckhc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| # SPEC-46 P1: Docs — Preview HTML and Markdown (feat/serving-html) | ||
|
|
||
| ## Status | ||
| ✅ **Verified on device.** 21 commits, 1243 server tests, 2061 app tests. All green. | ||
|
|
||
| ## What ships | ||
|
|
||
| ### Desktop & App | ||
| - **Docs screen** (Option A from the spec): grouped by repo/worktree, searchable by title and path, filterable (All / Mockups / Specs / Changed) | ||
| - **Markdown preview** in-app: front-matter (Status/Priority/Branch) hoisted above the title, reader-width toggle for desktop | ||
| - **HTML preview**: local clients open in Safari/Edge via `docs.open` (no serving). Remote clients publish and share via tailnet grant. | ||
|
|
||
| ### Server | ||
| - **D1 rev 2 — Everything git doesn't ignore**: `git ls-files --cached --others --exclude-standard` (69 docs in teachme, 143 in makit), with fallback to the old allowlist (`mockups/`, `docs/`, `*.md` at root) when git cannot answer | ||
| - **D8 rev 2 — Where the viewer is decides how**: loopback client → `docs.open` → OS opener. Tailnet client → publish → grant → URL. No webview. | ||
| - **D9/D10/D15**: tailnet-bound HTTP listener, lazy on first publish, capability URL in the path (no bearer), TTL-gated grants | ||
| - **D11**: snapshot streaming, indexed by worktree, enriched with mtime, status, and changed flag | ||
|
|
||
| ### Fixes from ocr review | ||
| - `serverIsLocal` reset on reconnect (race window between local→remote switch) | ||
| - `markdownError` plumbed through FutureBuilder | ||
| - Listener bind/close races coalesced | ||
| - Popover crash when available height < 96pt (fixed with Flexible + ConstrainedBox) | ||
| - All three `hello.ack` paths now send `isLocal` | ||
| - `docs.open` refuses win32 (argv-only, no shell) | ||
| - Defensive error handling in scan loop | ||
|
|
||
| ## Verified behavior (device test) | ||
| - ✅ teachme shows **69 docs** (was 3 with D1 rev 1) | ||
| - ✅ Popover **search field** works, filters title+path | ||
| - ✅ Paths are **relative** in popover, **absolute** in Docs screen | ||
| - ✅ **Open in browser** button on local client (no serve) | ||
| - ✅ Edge opened HTML without any HTTP listener for this profile | ||
| - ✅ `hello.ack` carries `isLocal: true` on loopback | ||
|
|
||
| ## Known non-issues | ||
| - `flutter_tester` WebSocket concurrency flake (~19 failures per full-suite run, all `: loading ` entries, zero real assertion failures) | ||
| - ocr found 48 issues: 5 high (all fixed + tests), 19 medium (left for follow-up), 24 low (left for follow-up) | ||
|
|
||
| ## Test coverage | ||
| - Server: 1243/1243 pass (includes new race, timeout, coalesce, arg-passing tests) | ||
| - App: 2061 pass (includes new D8 rev 2 local/remote split tests) | ||
| - Both: typecheck clean, analyze clean | ||
|
|
||
| ## Not in P1 (deferred to P2+) | ||
| - P2: Canvas (doc beside chat, live-reload) | ||
| - P3: HTML in-app webview | ||
| - P4+: VCS annotations, publishing from within the preview | ||
|
|
||
| ## Branch readiness | ||
| - All commits squashed per project style? No — kept logical units for review | ||
| - PR template required? Check with maintainers | ||
| - Needs rebase? No — all commits since P1a exist only in this branch | ||
|
|
||
| ## For reviewers | ||
| - Start with `d627c229` (SPEC-46 P1a) to see the security boundary | ||
| - `00317d01` has the D1 rev 2 restructure (git vs walk) | ||
| - `20a1cd8d` is the major refactor (ocr fixes + defensiveness) | ||
| - `8495844a` wires D8 rev 2 (local OS opener) | ||
|
coderabbitai[bot] marked this conversation as resolved.
Outdated
|
||
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.