Skip to content

Open Alt-click comments directly - #163

Merged
max-sixty merged 5 commits into
mainfrom
codex/alt-click-comment
Aug 31, 2026
Merged

Open Alt-click comments directly#163
max-sixty merged 5 commits into
mainfrom
codex/alt-click-comment

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Alt-click already identifies both the target and the reader's intent, so this change opens the anchored comment composer immediately instead of first presenting the shared Comment/reaction bar.

Keyboard item selection with s remains a general target-selection gesture and still raises the shared response bar. The runtime now names those two transitions separately while retaining the same semantic anchor capture underneath them.

The browser coverage, public guidance, and release-notes example now reflect the direct path. The full test suite passes (746 tests), along with pre-commit and a light/dark, narrow/wide interaction sweep.

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

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

One stale claim left behind by the split. paintAnchors in skills/leaf/assets/runtime/anchors.js still accounts for the aim-and-composer coexistence with the old two-step: search for the paragraph beginning The ⌥ aim does not wear this paint — it says a press while the box is up "selects another target and raises its action bar". That is now what s does; the ⌥ press moves the draft. The PR updated both of its twins — aimedTarget's comment in aim.js and the docstring on test_the_aim_still_promises_while_a_composer_is_open — so this reads as a missed third copy rather than a deliberate keep. The paragraph's conclusion still holds; only the parenthetical mechanism is wrong (anchors.js#L744-L747).

    // why). An open composer doesn't stand the aim down — a press while the box is up
    // moves the draft onto another target — so the two can show at once, which is the
    // true state: where the draft stands, and where the next comment would land.

Happy to push that as a commit if you'd rather not round-trip it.

What else I checked
  • openTargetComposer reproduces fab.onclick's three steps exactly (showFab(null, null, {returnFocus: "none"}) then openComposer(anchor, "", left, top)), so the direct path writes the same anchor the two-step wrote, and openComposer's draft-move branch is what carries typed text onto a re-aimed target.
  • about can't drift on the new door: aimIsAvailable is () => !designIsOn(), so the aim branch is unreachable in design mode and openComposer's about default stays null.
  • fabTargetAt/fabReturnTo are read only by reactions.js, which the aim no longer reaches, so leaving fabAnchor unset on this path strands nothing.
  • The item outline survives the class change: lf-action-target is gone from the ⌥ route, and paintAnchors' pending branch puts lf-mark-el lf-pending on the same parts — which the rewritten flowchart test asserts.
  • Reactions on a whole item stay reachable by s (rewritten test) and on visuals by plain click through activateVisual, so docs/index.html's "diagrams and images also expose response actions by click" holds.
  • No other activateAimTarget or aim.respond reference is left anywhere in the tree, and no references/ or SKILL.md prose describes the old two-step.
  • Every other Alt-click test in the suite asserts the promise or the design-mode path rather than the bar, so the update looks complete; ci is green on this head.

@max-sixty

Copy link
Copy Markdown
Owner Author

Updated the remaining paintAnchors explanation in ce4e31c so it describes the direct Alt-click behavior: the open draft moves to the newly aimed target, with no intermediate action bar.

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

@max-sixty
max-sixty merged commit 7f58225 into main Aug 31, 2026
3 checks passed
@max-sixty
max-sixty deleted the codex/alt-click-comment branch August 31, 2026 05:33
max-sixty added a commit that referenced this pull request Aug 31, 2026
The complete nightly suite on `main` caught a stale public
example-preview input digest after the preview-handoff and runtime
changes were combined with #161. This branch now includes the later main
updates from #163 as well, then regenerates through
`scripts/example-previews.py`; all nine preview images remain
byte-for-byte unchanged.

Validation on that merged tree: all 20 tests in `tests/test_site.py`
pass, followed by every pre-commit hook.

> _This was written by Codex on behalf of max-sixty_
max-sixty added a commit that referenced this pull request Aug 31, 2026
…eeping (#162)

## Problem

A thread-panel render arriving while a resolution fold was still moving
retook the list's scroll hold from whichever card had slid under the
stationary pointer. It could pin a card above the fold and let the
intended successor keep rising. The two-second heartbeat could trigger
that render, which made the failure depend on runner load.

## Solution

While a fold is active, a new hold now inherits the first live reference
from the preceding hold. `heldBox` gives hold creation and correction
one definition of a card that can still preserve the reader's place. The
regression pauses the fold, lands an unrelated reply mid-motion, and
verifies the target card stays fixed both then and after the fold
finishes.

## Refresh and testing

The branch is refreshed through `main` at `77a8681`. Running
`scripts/example-previews.py` reproduced all nine preview images
byte-for-byte and updated the manifest's runtime-input digest to
`ff92edc6…`.

- `uv run pytest tests/test_render_conversations.py
tests/test_render_aim.py tests/test_render_reactions.py
tests/test_site.py --run-nightly -n 4 --dist loadgroup -q` — 128 passed
on the final tree
- `pre-commit run --all-files` — passed
- `node --check skills/leaf/assets/runtime/conversation/thread-list.js`
— passed

The complete 1,576-test nightly suite passed on the immediately
preceding merged tree; after #163 entered `main`, the four browser
owners affected by the combined changes were rerun above.

Automated fix for [failed run
33347154927](https://github.com/max-sixty/leaf/actions/runs/33347154927).

> _This was written by Codex on behalf of max-sixty_

---------

Co-authored-by: leaf-agent <318509791+leaf-agent@users.noreply.github.com>
Co-authored-by: Maximilian Roos <maximilian@Mac.router95a6f8.com>
Co-authored-by: Maximilian Roos <m@maxroos.com>
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