Skip to content

Studio: a History row opens by mouse, and a hint closes when its trigger leaves the page #1044

Done

Description

@danielrispler

Parent

#1036

What to build

Root cause 1 of #1036, for the left panel and hints. Pressing a History row with the mouse opens that session's story, as Enter already does. A hint whose trigger has left the page closes within one prune tick, instead of staying open in the window's top-left corner.

  • The left panel's outside press. The panel's outside-press check decides from the event's path captured at dispatch, not from the pressed element's ancestors read after the row's own handler has redrawn the panel. History rows keep selecting on pointerdown, and nothing stops the event's propagation.
  • Hints. An open hint that no trigger on the page names closes. Opening a hint queues a prune, and the prune re-queues itself while any hint is open. The check does not read whether the recorded owner or openTrigger is connected, since hint() records each new trigger before patch() may keep the older node.

The rules are #1036's, "Implementation Decisions", root cause 1.

Acceptance criteria

  • Extend the mapPanelHistory snap fixture:
    • with the real pointer, pressing an ended session's row in History opens its story in the left panel and selects the session, with no select of a null id after the press;
    • the row's hint is opened by hovering before the press, and after the press no hint is open, nor any hint placed outside its trigger's box.
  • A press outside the left panel still closes it. The existing pressClosesPanel table in ui/tests/map.test.mjs stays green.
  • ui/tests/hint-redraw.test.mjs gains rows:
    • an open listener-path hint whose trigger is removed, with no further hint() call, closes within one prune tick;
    • an open hint whose trigger patch() kept across a redraw stays open;
    • a trigger set aside and put back keeps its hint node.
  • docs/studio/behaviour/sessions.md:
    • History rows open a session's story by mouse and by keyboard alike;
    • a hint closes when no trigger on the page names it.
  • npm run check passes, and npm run snap -- mapPanelHistory <out.png> passes locally. snap.yml skips the draft integration PR.

Reading

Touches

  • Files: ui/panel.ts, ui/dom.ts, ui/tests/hint-redraw.test.mjs, scripts/snap/fixtures-panel.ts, docs/studio/behaviour/sessions.md
  • Session: auto mode
  • Route: strong · effort high — risky UI: the panel's pointerdown handler across a redraw, and the hint prune's open state across redraws

Activity

  1. added
    ready-for-agent
    on Dec 1, 2026
  2. self-assigned this
    on Dec 1, 2026
  3. danielrispler commented on Dec 1, 2026

    @danielrispler
    OwnerAuthor

    Implemented on the integration branch, PR #1051.

    Route outcome: strong·high claude/opus → pass | 13m

  4. added a commit that references this issue on Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ready-for-agent

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions