Repository navigation
doxBench's draft view lands on the document, with its fields behind a tab - #145
Merged
Merged
Conversation
… tab Two annotations, one fault. `openDraft` rendered ONLY the create form, and the overlay's other regions are SCOPE-BOUND — a draft has no tile, so docs, lens and outline had nothing to show. The thing the human came for, the drafted fragment, was not on screen at all. That is what "the doxWorkbench is empty" was describing. It now opens on the DOCUMENT and keeps the header fields on a `details` tab, already filled in (area, topics, status, kind, repository context, provenance), with `name it and create →` moving between them so the tab is not something to hunt for. THE DOCUMENT IS READ-ONLY, AND SAYS WHY. `create-document` writes the HEADER CONTRACT; the body is written in the editor that opens on the created file. Text typed here before the document exists would have nowhere to land — an editable box that silently discards what you write is worse than one that explains itself. TITLE AND SUMMARY STAY EMPTY, deliberately, against Brett's "prefill all these fields". The create route refuses without them, and the promoted requirement says the summary is "one sentence — yours to write, never generated here". Prefilling them with the seed's own `TO WRITE —` line would satisfy the route and land a document whose summary is a placeholder, which is the exact outcome that rule exists to prevent. Everything computable IS prefilled; these two are not computable. Still open, and the reason this is not yet the full flow Brett described: the body cannot be authored before the create, because `create-document` carries no body — landing one is create-then-edit, two governed verbs. That orchestration is the next piece. Suites 2820 passed (exit 0). Live from a `domains` selection: the overlay opens on `document*` with the fragment scrolling inside it, `name it and create →` switches to `details*` carrying the prefilled area/status/kind, and the tab back returns to the draft. Zero page errors. Co-Authored-By: Claude Fable 5 <[email protected]>
There was a problem hiding this comment.
Hi @brettheap! 👋
Your private repo does not have access to Sourcery.
Please upgrade to continue using Sourcery ✨
There was a problem hiding this comment.
Pull request overview
This PR adjusts doxBench’s “draft” entry path so opening a lens seed lands on the drafted fragment (document view) instead of showing only the create form, with the header fields moved behind a details tab and a guided “name it and create →” path to proceed.
Changes:
- Update
openDraftto render a two-tab draft surface (document-first, details/create form second) and keep the draft body read-only with an explicit explanation. - Add CSS for the new draft tab strip and pane layout.
- Extend tests and the session runbook to cover/describe the new draft-view behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/ideation-dashboard/test_bullseye_widget.py | Adds assertions covering the new draft-view tab structure and document-first landing behavior. |
| scripts/ideation_dashboard/web/views/staging-workbench.js | Implements the new document-first draft UI and moves the create dialog behind the details tab. |
| scripts/ideation_dashboard/web/styles.css | Styles the new draft tabs/pane and seed text scroll region. |
| docs/ideation-dashboard-session-runbook.md | Documents the updated draft flow and the rationale for read-only document view + empty Title/Summary. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+1367
to
+1380
| const strip = el("div", "swb-drafttabs"); | ||
| const pane = el("div", "swb-draftpane"); | ||
| const tabs = [ | ||
| { id: "document", label: "document" }, | ||
| { id: "details", label: "details" }, | ||
| ]; | ||
| const buttons = new Map(); | ||
|
|
||
| function showPane(id) { | ||
| for (const [key, btn] of buttons) { | ||
| btn.setAttribute("aria-selected", String(key === id)); | ||
| btn.disabled = key === id; | ||
| } | ||
| pane.innerHTML = ""; |
Comment on lines
+2215
to
+2216
| .swb-drafttab[aria-selected="true"] { color: var(--ink); font-weight: 700; border-color: var(--ink); cursor: default; } | ||
| .swb-draftpane { display: flex; flex-direction: column; gap: 8px; min-height: 0; } |
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.
Two annotations, one fault.
Why it looked empty
openDraftrendered only the create form, and the overlay's other regionsare scope-bound — a draft has no tile, so
docs,lensandoutlinehadnothing to show. The thing you came for, the drafted fragment, wasn't on screen
at all.
Now it opens on the document
The draft view lands on the document and keeps the header fields on a
detailstab, already filled in (area, topics, status, kind, repositorycontext, provenance).
name it and create →moves between them, so the tabisn't something to hunt for.
The document is read-only, and says why.
create-documentwrites theheader contract; the body is written in the editor that opens on the created
file. Text typed here before the document exists would have nowhere to land —
an editable box that silently discards what you write is worse than one that
explains itself.
Title and Summary stay empty — deliberately
You asked to "prefill all these fields". Everything computable is prefilled;
these two aren't computable. The create route refuses without them, and the
promoted requirement says the summary is "one sentence — yours to write, never
generated here". Prefilling them with the seed's own
TO WRITE —line wouldsatisfy the route and land a document whose summary is a placeholder — exactly
the outcome that rule exists to prevent.
Still open
This isn't yet the full flow you described. The body can't be authored before
the create, because
create-documentcarries no body — landing one iscreate-then-edit, two governed verbs. That orchestration is the next piece.
Verification
pytest— 2820 passed, 19 skipped, exit 0.domainsselection: overlay opens ondocument*with thefragment scrolling inside it;
name it and create →switches todetails*carrying the prefilled area/status/kind; tab back returns to the draft. Zero
page errors.