Repository navigation
feat(web): read written documents and the user manual as a printed page - #337
Closed
pratikbuilds wants to merge 8 commits into
Closed
pratikbuilds wants to merge 8 commits into
pratikbuilds wants to merge 8 commits into
Conversation
|
Triage: Fail @pratikbuilds, please address the following:
Stacked on #336: only this pull request's own changes were checked. |
pratikbuilds
force-pushed
the
room-document-page
branch
from
November 20, 2026 14:19
c5cdded to
74578eb
Compare
pratikbuilds
force-pushed
the
room-prompt-box
branch
from
November 20, 2026 14:19
7690de0 to
98fa26e
Compare
The reading pane's document held its version reading, its Approve action, its notes about the version shown and its Markdown file inline. They move into useVersionReading, useApproveGroup, VersionNotes and pane-file's documentFile, so a written document's page can read its versions the same way. The notes' wording moves into config.
useDocumentPage turns the room's read of a written document and the versions the hub keeps into the printed page's props: the title lifted from the text, the filed date in the running header, Approve, the version menu and the download in the page's bar, the version notes, the comparison, and the passage quote. WrittenDocumentView draws them on DocumentPage, and WrittenDocument joins the two.
Filed, approved, an older version, a version being read, a failed read, no history, a comparison, an approaches document, dark and narrow.
A written document in the project view now opens as the printed page from DocumentPage, with its contents beside it, instead of the pane's markdown view. DeliverableBody hands any Markdown document to the new writtenDocument slot, which the room fills with WrittenDocument; the version menu, Approve and the download move from the floating bar into the page's own bar. Quoting a passage, comparing versions and the loading, empty and error lines work as before, and Print copies the page's sheet. The markdown branch, its lifted heading and the approach choice leave DeliverableBody.
The open project view with an older version, a comparison, the loading and error lines, and at phone width in light and dark. ProjectOpen and ProjectOpenDark already draw the page itself.
The manual's tab now shows it on the same page as the other written documents, titled User manual with its pictures in place, and UserManualView with its stories goes. The manual follows the app, so its running header says As built instead of a filing date, and it has no versions to pick.
The page's title already shows the heading both versions share, so the comparison drops it. A heading that changed stays in, so the change shows.
In the room a written page lies on the muted grey, a step darker than the sidebar's, as in the design; dark keeps its black backdrop. Where the canvas is narrow and the project's name floats over its corner, the page's bar starts below it.
pratikbuilds
force-pushed
the
room-prompt-box
branch
from
November 20, 2026 16:53
98fa26e to
7b1c814
Compare
pratikbuilds
force-pushed
the
room-document-page
branch
from
November 20, 2026 16:53
74578eb to
524ea23
Compare
Contributor
Author
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.
PR 3 of 5 in the room revamp. Base: #336 (PR 2). By the plan it needs only #303–#306; it's stacked on PR 2 to keep one line of history. Plan: Builder UI revamp, section "PR 3: written documents as a printed page".
What changed
Inside the project view, written documents (problem brief, constraints, approaches, requirements, build plan) and the user manual show as #305's printed page, with their sections listed beside it.
document-page.model.tsreads the document and its versions and gives the page its title, running header, bar, text and quoting; the view never sees hub data.version-reading.ts,approve-group.ts,version-notes.tsx).DocumentViewfor written documents, anduser-manual.view.tsx.config.ts(versions,documentViewer.asBuilt).What behaves differently
How to test
Run it: check out
room-document-page,bun install,bun run dev,bun run dev:seed -- --fixture=habit-tracker --stage=ready_to_build.…-vN.mdfile is saved.On "<title>" vN:and the passage go into the box (comments replace this in PR 5).Storybook: Screens/Workspace/WrittenDocument → Filed, Approved, OlderVersion, Comparing, VersionReadFailed, UserManualPage, Dark, Narrow; Screens/Workspace/Room → ProjectOpen, DocumentPageComparing, DocumentPageNarrowDark.
How it was verified
bun --conditions=intx-src test ./apps/web/src ./packages: 298 pass. Model tests cover the title, header, bar, Approve, history unavailable, quoting, and comparisons.Not exercised
Open design questions:
DocumentPage(feat(web): add the print-like document page with its contents #305) hides the section list when its area is under 1180px. With the sidebar open on a 1440px window the area is 1016px, so the list is hidden on a typical laptop.