Repository navigation
Doxchat rail annotations: remove the header line; dirty-conditional Save/Cancel/Unload canvas slot (Amendment 1 to phase-a/b) - #229
Merged
Conversation
Brett's 2026-08-21 browser annotation on `div.doxchat-header`, left on the staging-workbench overlay's doxbench rail: "remove this section." The line read "Working on — <doc> · Chatting about — Outline: <name> · N loaded documents". It restated what the loaded-document selector directly below it already shows, so the ruled redundancy is the line, not the selector. Removed: - the `header` node and its place in the rail's `host.append` order; - `renderHeader`, which with the line gone was a one-line forwarder to the `renderLoadedSelector` that already runs at every one of its three call sites — those sites now name that render directly; - the orphaned `.doxchat-header` styles.css rule. The rail is a flex column with its own 12px padding and an 8px gap, so the selector simply becomes the first child; no spacing was carried by the removed rule. THE BINDING OBLIGATION IS NOT REMOVED WITH IT. Both doxbench phase deltas require that "the chat surface MUST state that binding, so the human can see which material the conversation is working on before they send". After this change that rests entirely on the two surfaces that survived: the selector renders the SELECTED entry (`select.doxchat-loaded`, which lists the reserved outline plus every loaded document), and the sr-only `doxchat-loaded-full` live region names that entry's full path for assistive technology. T100 P1-C's dual-target disclosure ruling is SUPERSEDED by this annotation rather than quietly dropped, and the code says so where the header used to be built. Tests: the three suites that pinned the element are CONVERTED, not deleted — each now asserts the header's ABSENCE plus the binding statement on its surviving surfaces, so a re-introduced line fails and so does a removal that took the binding statement with it. The grounding count the line claimed is the selector's own listing, pinned entry by entry in test_doxbench_tile_verbs.py. Annotation A2 (fold the rail's Unload button into the right panel's Cancel slot) is NOT in this commit: it contradicts a pinned requirement in two active changes and needs an OpenSpec amendment first. See the report. Gates: `pytest tests/ideation-dashboard -q` exit 0 (3700 passed, 14 skipped); `pytest tests/doc-health -q` exit 1 with exactly the four known client-identity location artifacts; `openspec validate --all --strict` exit 0 (62/62). 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 removes the doxbench chat rail’s standing header line (div.doxchat-header) and shifts the “binding is stated on the chat surface” assertions to the two remaining binding surfaces: the loaded-document selector (select.doxchat-loaded) and the sr-only live region (div.doxchat-loaded-full).
Changes:
- Removed the
doxchat-headerDOM node and itsrenderHeader()updater, routing all previous update sites directly throughrenderLoadedSelector(). - Dropped the orphaned
.doxchat-headerCSS rule. - Updated the ideation-dashboard test suites to assert (a) the header remains absent and (b) the binding statement remains present and moves correctly via the selector + sr-only region.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/ideation-dashboard/test_doxbench_view.py | Updates rail readiness + binding assertions to use doxchat-loaded / doxchat-loaded-full and explicitly asserts header absence. |
| tests/ideation-dashboard/test_doxbench_tile_verbs.py | Converts “header states binding/count” test into “selector + sr-only region state binding” and asserts header absence. |
| tests/ideation-dashboard/test_doxbench_composition.py | Adjusts composition harness to wait for selector and assert header absence in the empty-state scenario. |
| scripts/ideation_dashboard/web/views/doxbench-chat.js | Removes header element and renderHeader(), updates append order, and ensures rendering flows through renderLoadedSelector(). |
| scripts/ideation_dashboard/web/styles.css | Removes styling for .doxchat-header now that the element is gone. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Brett's 2026-08-21 browser annotation on `button.doxchat-unload`: "remove this button here and incorporate its function into the right panel 'cancel' button. if there is a change to save or cancel, then have those buttons. if no changes, then have that be 'unload' button." THE AMENDMENT FIRST. As written, both doxbench phase changes required "exactly ONE Save control and exactly ONE Cancel control", with a scenario requiring both present whenever the canvas renders — a clean canvas showing a single Unload would have presented zero of each. Brett ruled it in session (multiple choice, recommended option adopted), and Amendment 1 is recorded in both proposals in the house form: the canvas control pair is dirty-state-conditional — Save+Cancel while the selected buffer is dirty, a single Unload control for a clean unloadable buffer — authorizing browser annotation A2; the rail's standalone unload control and its two-press arm flow are superseded. Three readings the annotation left open are settled IN THE REQUIREMENT rather than in the realization: - ANY-buffer-dirty, not selected-buffer-dirty. Save answers for the whole canvas, so a selected-buffer rule would hide the only Save from a human whose outline still held unsaved text merely because they had stepped onto a clean document. - A clean RESERVED buffer (the outline, and the unbacked `document` slot) renders Unload VISIBLY INERT with its reason stated, not absent. Same posture the tile's Save verb uses; an absent control answers no question and an emptying slot would collapse the tab row on every selection change. - With no gate capability the slot does NOT swap, because that surface's own scenario requires Save's absence as visible text beside it, and an ungated surface is never dirty. The loaded-set requirement is untouched. Its dirty-unload scenario now states that WITHHOLDING the affordance satisfies the refusal clause — a stronger discharge than the arm flow, since there is no press to get wrong — and that the state-level refusal keeps standing regardless. THE CODE. `doxchat-unload`, its click handler, the `unloadArmedKey` two-press flow, its render posture and its CSS all go. The shell's `unloadBuffer` seam is retired rather than left dead, and the shell now follows the loaded set through the canvas's own declared `onLoadedSetChanged` notification, which carries the same tail that seam ran. `doxbench-unload` joins `doxbench-actions` beside Save and Cancel, driven from `syncPanelControls` off the SAME `anythingDirty` derivation Save already reads — no second dirtiness source. It calls the same `unloadDocument` controller, with all three refusal layers left standing as the floor. Its title carries the reason sentences the rail control had, verbatim, so no accessible text was lost in the move. Tests: three-state coverage added and the arm-flow tests converted, not deleted — the rail control's absence, Unload-alone when clean, Save+Cancel with Unload gone when dirty, the reserved-outline inert posture, and that Unload actually unloads with the selection falling to the outline. Three mutations run and killed: inverting the dirty condition, swapping any-buffer for selected-buffer, and dropping the reserved guard. The second one SURVIVED on first run and is why `test_the_swap_reads_any_buffer_dirty_not_the_selected_buffer` exists. Gates: `pytest tests/ideation-dashboard -q` exit 0 (3702 passed, 14 skipped); `pytest tests/doc-health -q` exit 1 with exactly the four known client-identity location artifacts; `openspec validate` exit 0 for phase-a, phase-b, and `--all --strict` (62/62). Co-Authored-By: Claude Fable 5 <[email protected]>
Comment on lines
+999
to
+1003
| // UNLOAD -- the slot's THIRD occupant, and the one that is alone when it is | ||
| // there (Brett's 2026-08-21 annotation: "if there is a change to save or | ||
| // cancel, then have those buttons. if no changes, then have that be 'unload' | ||
| // button."; Amendment 1 on both doxbench phase changes authorizes it). | ||
| // |
Comment on lines
+1340
to
+1344
| function unloadActiveBuffer() { | ||
| const key = activeBuffer; | ||
| if (key === OUTLINE_BUFFER_KEY || key === UNBACKED_DOCUMENT_BUFFER_KEY) return; | ||
| if (!holdsBufferKey(key)) return; | ||
| // `unloadDocument` owns the whole tail: it announces its own refusals, moves |
Comment on lines
+304
to
+308
| **Amendment (2026-08-21, Brett, in-session multiple choice, recommended option | ||
| adopted): the canvas control pair is dirty-state-conditional — Save+Cancel while | ||
| the selected buffer is dirty, a single Unload control for a clean unloadable | ||
| buffer — authorizing browser annotation A2; the rail's standalone unload control | ||
| and its two-press arm flow are superseded.** |
Comment on lines
+180
to
+184
| **Amendment (2026-08-21, Brett, in-session multiple choice, recommended option | ||
| adopted): the canvas control pair is dirty-state-conditional — Save+Cancel while | ||
| the selected buffer is dirty, a single Unload control for a clean unloadable | ||
| buffer — authorizing browser annotation A2; the rail's standalone unload control | ||
| and its two-press arm flow are superseded.** |
The review found the code correct on every driven state and the amendment text wrong in the one place that outlives it. Ten fixes, no behaviour change to a state a human can reach except F7. F1 (HIGH) — both Amendment 1 headlines recorded the predicate the change REJECTS. They read "Save+Cancel while the selected buffer is dirty" while the requirement, the reasoning and the code all take ANY-buffer-dirty. The headline is what archives, so it was authorizing the defect. Both now read ANY buffer, and each carries a new paragraph saying the ruling is recorded in its any-buffer reading and why: Brett's "if there is a change to save or cancel" names two predicates, and only the any-buffer one keeps Save on screen for a human whose outline still holds unsaved text. F2 — phase-a's amended scenario asserted about a state its own WHEN excluded. Split into two scenarios, the way phase-b already did it. F3 — the gate-absent "MUST NOT swap" clause had no scenario and no test, and the reviewer's mutation survived the full suite. Added both, written to the branch the clause actually reaches: the canvas module's own no-save-seam path. Recorded honestly in the amendment that through the shipped shell a gate-off console renders no canvas controls at all, so this is a module-level invariant rather than an end-user posture. F4 — the "no second source of dirtiness" MUST cannot be held behaviorally (a byte-identical second derivation passes every driven state). Pinned structurally in this repo's established idiom: one `anythingDirty` binding, Save reads it, the swap reads that same name and never rescans the buffers. F5 — added the save-in-flight probe. It pins the real invariant (the pair stays, both inert, no Unload; swaps only once settled and clean). F6 — the scenario says Unload MUST name the selected document; the test only checked a constant tail. It now compares the title against the actual selection. F7 — the inert reserved Unload delivered its reason HOVER-ONLY, on a disabled and therefore unfocusable button, while the same requirement insists an unreachable Save state its reason as visible text. Followed the requirement's own standard and the save-note idiom: a `.doxbench-unload-note` element carries the reason, the title stays, the scenario now says visible text, and the new class has its CSS rule. F8 — the "carried over verbatim" claim was false for one string: an em dash had become `--`. Restored; the claim now stands. F9 — `onLoadedSetChanged` was introduced BESIDE the two explicit `syncContextFromCanvas(); refreshDocTiles()` pairs the seams already ran, so every pre-existing act redrew the wheel twice and a docs-row switch up to three times. Two spellings of one tail — the exact criticism that retired the `unloadBuffer` seam. Both explicit pairs deleted, and switchDocument's double notify deduped against setActiveBuffer's (which early-returns on an already-active key, so the second fire is still needed in that case and is now conditioned on exactly that). Measured on a counting wrapper around the wheel's own refresh: load 2->1, select 2->1, unload 1->1, row-switch 1, pinned by a new test so the double cannot come back. F10 — one sentence naming ledger tasks 7.1 and 8.6 as superseded, closing the traceability hole without rewriting another session's ledgers. An honest note carried in code and test: `!saving` in the swap condition has NO reachable state today, because `save()` clears `saving` in its `finally` BEFORE `adoptSavedBase` rebases any buffer, so `!anythingDirty` alone already holds the pair through the whole flight. The term is kept as defensive and pinned structurally, with the reason written down, rather than dressed up as a behavioural assertion that asserts nothing. Mutations: all seven now die — M1 invert dirty, M2 any->selected, M3 drop reserved guard, M4 gate-absent swap, M5 second derivation, M6 drop !saving, M8 unnamed unload. Sources verified byte-restored by checksum after each. Gates: `pytest tests/ideation-dashboard -q` exit 0 (3708 passed, 14 skipped); `pytest tests/doc-health -q` exit 1 with exactly the four known client-identity location artifacts; `openspec validate` exit 0 for phase-a, phase-b, and `--all --strict` (62/62). Co-Authored-By: Claude Fable 5 <[email protected]>
Comment on lines
+657
to
+673
| const running = controller.save(); | ||
| await new Promise((resolve) => setTimeout(resolve, 5)); | ||
| const inFlight = { | ||
| saveHidden: els.save().hidden === true, | ||
| cancelHidden: els.cancel().hidden === true, | ||
| unloadHidden: els.unload().hidden === true, | ||
| saveDisabled: els.save().disabled === true, | ||
| cancelDisabled: els.cancel().disabled === true, | ||
| }; | ||
| release(); | ||
| await running; | ||
| await new Promise((resolve) => setTimeout(resolve, 5)); | ||
| const settled = { | ||
| saveHidden: els.save().hidden === true, | ||
| unloadHidden: els.unload().hidden === true, | ||
| anythingDirty: Object.values(controller.state().buffers).some((b) => b.dirty), | ||
| }; |
… named the wrong route R1, the last open review finding. Two problems, both in the tests rather than the code: the `selectionMoved` dedupe was behaviorally correct on every shape and pinned by nothing, and the composition test that claimed to exercise it did not. THE PIN. `switchDocument` fires the loaded-set tail only when `setActiveBuffer` did not already fire it, because `setActiveBuffer` early-returns on an already-active key. Three mutations at that one line survived the whole suite: dropping the condition, inverting it, and dropping the tail. `test_one_loaded_set_notify_per_switch_whichever_shape` counts the injected `onLoadedSetChanged` across all four shapes, in the `boundRefusal` idiom the harness already carries: cross-key switch 1 (setActiveBuffer announces; tail stays quiet) same-key content switch 1 (setActiveBuffer silent; tail is the only one) unchanged, same key 0 (nothing moves, nothing is replaced) unchanged, from the outline 1 (no content moves, but the binding does) The two switch shapes both earn their place: N3 is invisible to the cross-key assertion and is caught only by the same-key one. THE CORRECTION. The composition block called itself a "DOCS-ROW SWITCH" and said it drove `switchDocument`. It cannot: by that point the reserved slot is backed, so the load verb takes `loadDocumentForEditing`'s already-loaded short-circuit, which selects through `setActiveBuffer` and never reaches `switchDocument`. The measurement was always valid as an ACT -- one refresh, which is the invariant that block exists to hold -- so the act stays and the false claim goes: key renamed `onRowSwitch` -> `onReloadHeld`, comment rewritten to the route the click actually drives, and both it and the F9 docstring now point at the canvas-module test for the shapes they cannot reach. A comment naming the wrong route is how the next reader "verifies" a path nothing exercises. Mutations: N1 drop the condition, N2 invert it, N3 drop the tail -- all three now die, each on the shape it actually breaks (N1/N2 cross-key saw 2; N3 same-key saw 0). The seven earlier mutations re-run for regressions and all still die. `doxbench-editor.js` and `staging-workbench.js` are untouched this lap and verified by checksum after every mutation; the change is test-only. Gates: `pytest tests/ideation-dashboard -q` exit 0 (3709 passed, 14 skipped); `pytest tests/doc-health -q` exit 1 with exactly the four known client-identity location artifacts; `openspec validate` exit 0 for phase-a, phase-b, and `--all --strict` (62/62). Co-Authored-By: Claude Fable 5 <[email protected]>
Follow-up to the merge of origin/main. The merge itself reported no textual conflicts, but it renamed `add-doxbench-editing-phase-a` into `archive/2026-08-21-...` (main archived it in #228) and carried this branch's Amendment 1 edits along with the rename. That is the one thing the merge got semantically wrong, and it is reverted here. WHY IT WAS WRONG. Main archived Phase A carrying its ORIGINAL control-count wording, so that is what the archival promoted into `openspec/specs/ideation-dashboard/spec.md` — "exactly ONE Save control and exactly ONE Cancel control", with a scenario requiring both present at mount. An archive amended after the fact would have claimed Phase A ratified a conditional slot while the spec its own archival produced said otherwise: a falsified record, and the same rule `add-staged-topic-outline-template`'s Amendment 1 applies to its supporting-docs copies. The archived change is therefore restored byte-exact to main's version. NOTHING IS LOST. Phase B declares this requirement under `## MODIFIED Requirements` and already carries the full amended text and the full Amendment 1 reasoning, so Phase B's delta is now the SOLE carrier of the correction and supersedes the promoted wording when Phase B archives. Until then the promoted spec describes Phase A's shipped posture and this delta describes the amended one — which is what a MODIFIED delta is for. A new paragraph in Phase B's Amendment 1 records exactly that, so a reader who finds the promoted text first is not left thinking the code disagrees with the spec by accident. COPILOT, acted on: the save-in-flight scenario used fixed `setTimeout(..., 5)` delays. A wall-clock sleep is a guess about scheduler load, and what the scenario measures — which controls are on screen mid-flight — is exactly what a slow machine would race. Reworked to bounded polls on the specific transitions (Save reports itself disabled; the saved buffers rebase clean), using the same `settle`/`until` idiom the later harnesses in this file already carry, spelled locally because this harness had no waiter of its own. COPILOT, recorded rather than fixed: the public `unloadDocument(key, …)` hard-refuses only the OUTLINE key while every UI path withholds BOTH reserved keys. The asymmetry PRE-DATES this branch — the retired rail control withheld the same two keys at the same layer — so the reachable surface was and is correct. Noted at the controller refusal and in Phase B's amendment as known looseness deliberately not widened here; tightening a public method is a contract change, not a UI amendment. Main touched none of this branch's four source files (`doxbench-editor.js`, `doxbench-chat.js`, `staging-workbench.js`, `styles.css`) — verified by diffing merge-base against origin/main — so the code side of the merge was trivial and both annotation removals survive intact. All ten mutations re-run on the merged tree and all still die (M1 7 failures, M2 3, M3 2, M4 1, M5 2, M6 1, M8 1, N1/N2/N3 1 each). Checksum discipline earned its keep during that run: the N-mutation reverter uses `git checkout --`, which restored the committed file and silently wiped the then-uncommitted controller comment. Caught by comparing the hash against the expected one, and restored — a merge really is where a pin vanishes quietly. Gates: `pytest tests/ideation-dashboard -q` exit 0 (3743 passed, 14 skipped — up from 3709 with main's incoming tests); `pytest tests/doc-health -q` exit 1 with exactly the four known client-identity location artifacts; `openspec validate add-doxbench-editing-phase-b --strict` exit 0 and `--all --strict` exit 0 at 63/63 (main added one item; phase-a no longer validates by that id, having been archived). Co-Authored-By: Claude Fable 5 <[email protected]>
Comment on lines
+377
to
+383
| export const UNLOAD_OUTLINE_RESERVED_TITLE = | ||
| "the outline is a reserved buffer every turn carries, and is never unloaded"; | ||
| export const UNLOAD_DOCUMENT_RESERVED_TITLE = | ||
| "this is the tile's own document, the reserved buffer a turn falls back on, " | ||
| + "and is never unloaded — load another document to work beside it"; | ||
| export const UNLOAD_NOTHING_SELECTED_TITLE = | ||
| "no loaded document is selected"; |
brettheap
added a commit
that referenced
this pull request
Sep 7, 2026
…ndment revokes it
I read the hosting plan FILE's `status:` field (line 108,
`registered_awaiting_operations_domain_approval`) and the OpsxFactory README
line ("APPROVAL (task 4.2) NOT GIVEN") and concluded no approval existed to
revoke. That was wrong. Measured by lane hermes-wallet-exercise and verified on
OpsxFactory origin/main:
openspec/changes/host-codexfactory-mcp-contract-service/tasks.md carries
- [x] 4.2 ... APPROVED 2026-09-05
Brett Heap, 2026-09-05T23:06Z, verbatim "approve 4.2, merge #221", over plan
digest 4e1a4b76..., recorded at OpsxFactory PR #229 comment 5555392080.
The plan file's `status:` stays unedited BY DESIGN, and the tick says why: "The
plan's bytes are NOT edited by this tick — editing them would move the approved
digest, which requirement 2 treats as a material amendment revoking this
approval." IN A DIGEST-APPROVAL REGIME THE APPROVAL CANNOT LIVE INSIDE THE
APPROVED BYTES. Read the tick and the ruling, never the plan's status field.
So the approve -> amend -> revoke -> re-approve cycle is REAL. The ordering
recommendation is unchanged and its reason is now the correct one: move first,
amend the plan's GITHUB references to codeXfactory/codexFactory, Brett
re-approves 4.2 over the new digest, then 4.4/4.5, then the 5.1 pin, then the
edge act. Moving first spends exactly one re-approval and no second acceptance.
This is the packet's SECOND error of the same class — reading a state off an
artifact the state deliberately cannot live in, after the README.md substring
match in the release-inventory count. Both are recorded in design.md rather than
quietly fixed, because a digest-approval regime makes this error attractive and
the next author deserves the warning.
The ACR finding STANDS and is restated more precisely: the plan's image path
(line 189) is acropensoftxfactoryqa.azurecr.io/opensoft/codexfactory-mcp, where
`opensoft/` is an ACR repository path segment and not a GitHub organization. It
does not move with a GitHub org transfer and is out of scope for OQ-4; only the
plan's GitHub references move.
Also flagged, not answered: the 4.2 tick names 4e1a4b76... as approved while
also naming 8abb0e96... as "the digest offered by codexFactory", and the plan
file's plan_digest block carries the latter after two post-registration
amendments. Which digest a re-approval is taken over is the OpsxFactory lane's
question.
openspec validate --strict green; --all --strict 98 passed / 1 failed
(unchanged); validate-sequenced-after.py green.
Lane: provenance-autonomous-merge
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.
Implements both of Brett's 2026-08-21 browser annotations on the doxbench rail, the second under an in-session-ruled Amendment to the two active doxbench changes.
A1 — the
doxchat-headerline is removed. Promoted specs pin neither element; the binding obligation ("the chat surface MUST state that binding") stays discharged by the loaded-document selector and the sr-onlyaria-live"Working on " region. Tests converted to assert absence plus the surviving binding statement — both failure directions caught.A2 — the rail's standalone Unload button (two-press arm/discard flow) is gone; the canvas actions row is now state-conditional. While any buffer is dirty: exactly one Save and one Cancel, no Unload beside them. While nothing is dirty: a single Unload control performing the loaded set's one way out for the selected buffer; reserved keys (the outline and the unbacked
documentslot) render it visibly inert with the reason in its title, carried verbatim from the removed control. The swap reads the exactanythingDirtyderivation Save already reads — one source of dirtiness, stated as a requirement and pinned by a dedicated test after a mutation to the plausible selected-buffer reading survived the first pass.Amendment 1 (Brett, in-session, 2026-08-21): phase-b's "One Save and one Cancel govern the doxBench canvas" requirement becomes dirty-state-conditional (four scenarios replace the mount scenario); phase-a's condensed restatement amended to match with an explicit deferral to phase-b's full statement; the loaded-set dirty scenario records that withholding the affordance satisfies the refusal clause in its strongest form. Ownership note recorded: phase-a/b belong to another session's thread (#216/#223); their tasks.md ledgers are untouched.
Also: the shell's docs-tile resync moved from the retired
unloadBufferseam to the canvas's declaredonLoadedSetChangednotification — the seam's stated purpose — so tiles stay current after canvas-internal unloads.Gates:
tests/ideation-dashboard3702 passed, exit 0;tests/doc-healthexactly the four known.git-path location artifacts; all threeopenspec validate --strictruns exit 0 (62/62 overall). Mutation checks: inverted dirty predicate, selected-buffer predicate, reserved-bypass — all killed.🤖 Generated with Claude Code