Skip to content

Compact conversation cards and align thread actions - #574

Merged
max-sixty merged 6 commits into
mainfrom
codex/compact-thread-actions
Sep 11, 2026
Merged

max-sixty merged 6 commits into
mainfrom
codex/compact-thread-actions

Conversation

@max-sixty

@max-sixty max-sixty commented Sep 10, 2026 •

Copy link
Copy Markdown
Owner

Conversation popovers now place Resolve beside Dismiss in the top-right corner and remove the empty action row above the first message. When several conversations share an anchor, the popover shows one at a time with local previous/next navigation.

The compact view reveals Reply only when requested or when a draft exists, and both explicit and light dismiss reset an untouched editor. The full Threads panel keeps its always-visible editor and card-scoped Resolve action. Pointer and keyboard landing preserve the distinction between opening a conversation, replying, resolving, and dismissing it; disabled navigation stays visually inert.

Validated with the full 1,011-test suite, all pre-commit checks, browser geometry assertions, and a context-blind usability pass.

This was written by Codex on behalf of @max-sixty

# Conflicts:
#	skills/leaf/assets/runtime/margin-projection.js
#	tests/test_render_margin.py
#	tests/test_render_navigation.py

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The compact card's stated contract — "reveals Reply only when requested or when a draft exists" — holds only on the explicit close. The preview is popover="auto", so clicking anywhere on the page light-dismisses it through the toggle handler, which doesn't collapse the disclosure the way closePreview does, and previewList keeps its card node across a close. Measured on this head: press Reply, click the page, reopen the same marker, and the reply editor is expanded with the Reply button gone and no draft behind it; going out through the Dismiss button leaves it correctly collapsed.

The other two are smaller — a disabled Previous/Next that still lights up under the pointer, and a null guard the send path lost. Suggestions inline.

Test evidence: tests/test_render_margin.py and tests/test_render_navigation.py are green on this head apart from test_a_tall_local_comment_survives_its_panes_posture_and_return and test_the_register_is_the_only_way_a_key_enters_the_runtime. Both fail at the merge base (331a14d7) under the same platform, selection and parallelism, at the same 2-failed/211-passed split, so neither is this branch's. The second is deterministic rather than flaky — anchor-controls.js carries a third keydown listener that the register's claim of two doesn't account for — and it is invisible to the green ci here because both files are nightly-marked.

Comment thread skills/leaf/assets/runtime/chrome.css Resolved

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

All three fixes hold, and I measured each rather than reading it. The light dismiss now collapses through the toggle handler ahead of the previewEntry guard, so closePreview's hidePopover and the outside click reach the same collapse and the reopened marker shows Reply with the editor closed; the disabled Previous keeps its rgba(0, 0, 0, 0)/--muted pair under the pointer; and reply?.lfRevealReply?.() guards the receiver. test_the_margin_groups_meanings_at_one_destination_without_moving_the_page and test_a_shared_passage_steps_between_single_conversation_cards are green on 25713f27, and the .lf-btn exclusion in theme.css is the right place for the shared idiom — shadow.js lifts that block at runtime, so no bundle needs rebuilding.

One new problem, from 95542bac rather than from the fixes: this branch turns tests/test_render_conversations.py::test_a_coined_class_cannot_reach_the_chromes_rules red. The compact card's scoped rules at chrome.css:1758-1764 name .lf-conversation-thread and .lf-conversation-head, which the authored theme already dresses at document level, so both join the themed set and the explicit exception at test_render_conversations.py:2431 no longer matches. The collision probe itself is clean — moved is still [] — so this is the tripwire asking for the widening on purpose, not a leaked rule. Hoisting the thread into the chrome layer is exactly the case lf-thread-head is already listed for, so the two belong in that set with the same kind of note.

Worth fixing here because nothing else will catch it: test_render_conversations.py is nightly-marked, nightly is skipped on pull requests, and the green test job on this head never runs it. It lands red on main's nightly instead.

Control run: this failure is the branch's, the other four are not

Same three files, same platform, same -n 2 selection, run at the head and at the merge base b24aa1de:

node id 25713f27 b24aa1de
test_a_coined_class_cannot_reach_the_chromes_rules fail pass
test_a_thread_about_a_fixed_part_of_the_layer_moves_neither_box fail fail
test_the_thread_list_ring_paints_above_its_scrolling_contents[light] fail fail
test_the_thread_list_ring_paints_above_its_scrolling_contents[dark] fail fail
test_an_unchanged_heartbeat_restates_no_margin_name[gallery] fail fail

Head: 5 failed, 171 passed. Merge base: 4 failed, 172 passed. The coined-class case is deterministic on both sides — it also fails alone at the head and passes alone at the merge base under -n0 in ~2.5s, so the split is not scheduling.

The other four reproduce at the merge base and are main's nightly rather than this branch's, alongside the two I reported earlier from test_render_margin.py and test_render_navigation.py.

@max-sixty

Copy link
Copy Markdown
Owner Author

Fixed in cfaa3e2c: the style-boundary test now explicitly classifies lf-conversation-thread and lf-conversation-head as shared authored-theme vocabulary used by the projected chrome card. The previously failing nightly node passes directly, and pre-commit plus the full 1,011-test suite remain green.

This was written by Codex on behalf of @max-sixty

@max-sixty
max-sixty merged commit 3d65da9 into main Sep 11, 2026
7 checks passed
@max-sixty
max-sixty deleted the codex/compact-thread-actions branch September 11, 2026 03:35
max-sixty pushed a commit that referenced this pull request Sep 11, 2026
…ntracts (#582)

The scheduled complete suite came back **38 failed, 2393 passed, 6
skipped** on [run
34562158190](https://github.com/max-sixty/leaf/actions/runs/34562158190).
Ten of those are already repaired by #576, #579 and #580, which merged
after that run started. This realigns eight more, all of them tests
stating a contract a recent change deliberately replaced without running
the nightly file that names it.

## The preview places itself before it hands over focus

#551 replaced the thread preview's placement engine with Floating UI and
made the lifecycle asynchronous: `deferThreadPreviewFocus` waits on the
placement promise and focuses the card from it. Three tests read
`document.activeElement` in the same turn as the press that opens it, so
they see the page rather than the conversation. Bisecting
`test_a_tap_on_a_quote_opens_its_thread` across `013f3c44..692032a`
names 24f4efc as the first bad commit, and a probe on `main` shows the
conversation arriving on the poll after the press.

`conversation_a_press_opened` states that ordering once for the three of
them. It keeps each test's own failure message — the wait answers None
rather than raising, so a press that opens the wrong conversation still
reports which one it opened, which is the whole point of the seam
fixture.

## The compact card reveals its reply box on request

#574 made the popover compact: Reply appears when asked for or when a
draft exists, and the card's accessible name became "Conversation for
…". So `test_pressing_the_current_element_mark_keeps_its_contour` waited
30s for a `textarea` the card no longer shows — the paint it asserts is
the same either way — and `test_a_drawing_can_be_sent_without_words`
looked for a dialog named "Thread for …". That test held the only
remaining reading of the old wording.

## Settlement reads `responds`

#561 made an agent reply settle a reader's word only by naming it in
`responds`, and made `leaf reply` require exactly one of `--for` and
`--initiates`. Three fixtures pre-date both: one invokes the CLI with
neither flag, and two append a reply event that the projection then
reads as unanswered, so the receipt and the neighbouring-page row stay
where the test expects them to move on. Other hand-written reply
fixtures do not assert settlement and are left alone.

## Verification

- Complete `tests/test_render_anchors.py`: **3 failed, 92 passed**. The
three are the response-bar and widget-text cases #547 already tracks.
- Complete `tests/test_render_drawing.py` and
`tests/test_render_controls.py`: **3 failed, 114 passed**. All three
fail on `main` without this branch — two are in #547's scope, and
`test_each_control_archetype_holds_its_neighbours_still[diff-review]` is
a thirty-ninth failure that arrived on `main` after the run above.
- `pre-commit run --files` over the three changed files: passed.

The rest of the run's failures stand. #547 carries them, and I have
refreshed it with what this run and `main` now show.

Co-authored-by: leaf-agent <[email protected]>
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