Skip to content

feat: a completed app includes a user manual that stays current with the app - #96

Closed
brianjfox wants to merge 2 commits into
mainfrom
feat/user-manual-required
Closed

brianjfox wants to merge 2 commits into
mainfrom
feat/user-manual-required

Conversation

@brianjfox

Copy link
Copy Markdown
Contributor

Closes #95

Items 1, 2, 4 and 5 of the issue; item 3 (mockup pictures for screens the check cannot reach) is left for a follow-up.

What changed

Coder side (workflows/coder/starter/AGENTS.md, workflows/coder/check/check-app.ts)

  • The manual is part of done: the app ships README.md and docs/USER-MANUAL.md, written once the features work and before the app is filed, and the done sentence names both. The manual is for the people who use the app, in plain, non-technical standard American English, never a developer's view of the code.
  • check-app reports a missing manual as a docs problem and goes on, so the rest of the check still runs and every page's picture is saved under docs/manual/ whether or not the manual shows it yet. A manual with no picture is reported the same way instead of stopping the run.
  • Once a manual exists it is held to the app: a picture whose name matches no page the check opened fails (the page moved or is gone), and an area of the app that was opened but the manual never shows fails, an area being a page's first path segment so one picture covers every record a list opens onto. The rule wording in the checklist says all this.

Hub and UI

  • packages/schemas/src/artifact.ts: UserManual, the markdown with its pictures keyed as the markdown names them, as data URLs.
  • apps/hub/src/artifacts/design-draft.ts: readUserManual reads docs/USER-MANUAL.md and the pictures it shows from the coder's workspace with the same symlink-safe reads the draft uses; manualPictureRefs and manualPictures are shared with the filed-app path. Sizes are bounded.
  • apps/hub/src/artifacts/service.ts and routes.ts: GET /api/tenants/:t/projects/:p/manual serves the live coder's manual, else the one filed with the latest app from the bundle's binaries.
  • packages/client: manual(tenantId, projectId).
  • apps/web: a User Manual tab in the document pane beside the live preview once a manual exists, rendered with its pictures in place, read again every minute while the coder works. The pane's tab selection moved into a selectTab helper to make room without crossing the complexity limit.

How it was verified

  • tsc --noEmit passes for the hub, the web app and the client; oxlint --deny-warnings and Prettier pass on every changed file.
  • bun --conditions=intx-src test passes for apps/web/src/pages/workspace, apps/hub/src/artifacts (two new tests for the picture reader) and apps/hub/src/builds: 97 tests.
  • check-app ran through the hub's own sandbox executor against the app built on 2026-11-02, in a throwaway hub container with the new file in place. Without a manual it reported "docs/USER-MANUAL.md is missing" and still opened the app and saved docs/manual/home.png. With a manual naming a picture of a page that does not exist, it reported that picture as of a page that may have moved or gone and the home page as not shown.

…current

The manual was written only when the person asked for one after the
build, so an app counted as done without it and nothing checked a
manual against the app once written. The coder's instructions now put
docs/USER-MANUAL.md beside README.md in what the app ships and in what
done means, written for the people who use the app in plain,
non-technical standard American English.

check-app reports a missing manual as a docs problem and goes on, so
the rest of the check still runs and every page's picture is saved
under docs/manual/ for the manual to show. Once a manual exists it is
held to the app: a picture of a page that no longer opens, and an area
of the app opened that the manual never shows, both fail the check,
which is what sends the coder back to the manual after a change.

Refs #95
The manual lived only in the coder's workspace and the downloaded zip.
The hub now serves it: docs/USER-MANUAL.md as the live coder keeps it,
with the pictures it shows carried as data URLs, else the one filed
with the latest app, whose pictures the bundle holds as binaries. The
workspace pane gains a User Manual tab beside the live preview once the
build has a manual, rendered with its pictures in place, and read again
every minute while the coder works, since the manual follows the app.

Closes #95

@corbits-triage corbits-triage Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Triage requests changes:

  • CI green: required checks are failing
    • e2e-pipeline
  • Invented fallbacks: added code matches a code pattern
    • apps/hub/src/artifacts/design-draft.ts:211 empty-fallback: Invented fallback (an empty string, list, object or zero); handle the missing value instead.
    • apps/hub/src/artifacts/design-draft.ts:226 empty-fallback: Invented fallback (an empty string, list, object or zero); handle the missing value instead.

@brianjfox

Copy link
Copy Markdown
Contributor Author

Continued, rebased onto the default-tab fix, with the triage findings and the e2e fixture fixed, in a replacement pull request from branch feat/user-manual-required-main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A completed app includes a user manual that stays current with the app

1 participant