Skip to content

doxBench's draft view lands on the document, with its fields behind a tab - #145

Merged
brettheap merged 1 commit into
mainfrom
change/draft-view-lands-on-doc
Aug 9, 2026
Merged

brettheap merged 1 commit into
mainfrom
change/draft-view-lands-on-doc

Conversation

@brettheap

Copy link
Copy Markdown
Contributor

Two annotations, one fault.

Why it looked empty

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 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
details tab, already filled in (area, topics, status, kind, repository
context, provenance). name it and create → moves between them, so the tab
isn't 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

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 would
satisfy 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-document carries no body — landing one is
create-then-edit, two governed verbs. That orchestration is the next piece.

Verification

  • pytest — 2820 passed, 19 skipped, exit 0.
  • Live from a domains selection: overlay opens on document* with the
    fragment scrolling inside it; name it and create → switches to details*
    carrying the prefilled area/status/kind; tab back returns to the draft. Zero
    page errors.

… 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]>
Copilot AI lite review requested due to automatic review settings August 9, 2026 17:16

@sourcery-ai sourcery-ai 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.

Hi @brettheap! 👋

Your private repo does not have access to Sourcery.

Please upgrade to continue using Sourcery ✨

@brettheap
brettheap merged commit 83cdff6 into main Aug 9, 2026
1 check passed
@brettheap
brettheap deleted the change/draft-view-lands-on-doc branch August 9, 2026 17:17

Copilot AI 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.

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 openDraft to 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; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants