Files
Naiyuan Qing ad7e621139 MUL-5860: unify internal link click semantics across all surfaces (#6667)
* feat(navigation): unify internal link click semantics (resolver + board/content-link pilots)

One shared resolveClickIntent() now defines the click behavior table
(plain = in place, cmd = background tab, cmd+shift = foreground tab,
middle = background). AppLink consumes it; openLink() threads the intent
through multica:navigate so content links in markdown and the editor
honor modifiers on all three platform listeners. Content links now
navigate in place on plain click (desktop previously forced a new
foreground tab). Editor mentions reuse the readonly mention cards
instead of a hand-rolled anchor. The "open issue links in new tab"
preference is removed (store, settings row, four locales).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(navigation): restore mention click shielding and type the content-link event

Review follow-ups: editor mention chips regain the stopPropagation shield
the hand-rolled handlers had (parity with the readonly wrappers), and the
desktop shell's multica:navigate listener types its event detail like the
other two listeners.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat(navigation): complete the click-semantics unification across all surfaces

Applies the shared click-intent contract everywhere the spec covers:

- AppLink: caller onClick now runs before every navigation path and its
  preventDefault cancels navigation (fixes the sidebar pin drag guard,
  enables guarded links).
- useRowLink and a new useIntentNavigate execute intents for row and
  callback surfaces; DataTable forwards the mouse event and middle
  clicks; table view navigates in place with modifier support.
- Chat thread rows, inbox rows, search palette results, actor avatars,
  and editor links (middle click) honor modifiers.
- "Open in new tab" added to inbox context menu and every entity row
  menu (projects, agents, skills, squads, autopilots, runtimes).
- ~20 push-on-click buttons converted to AppLink; agent-create back
  affordances use useBackOrReplace.
- Desktop: Cmd+[/], Cmd+arrows, mouse side buttons bound to per-tab
  history; Windows app-command forwarding; middle click closes tabs.
- Web: scroll restoration provider capturing data-tab-scroll-root
  offsets keyed by pathname, served through the shared pull protocol.
- Sub-issues section collapse moved to an in-memory keyed store so it
  survives in-session back navigation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(navigation): address review findings on the unification pass

- Mouse side buttons: single cross-platform source (renderer mouseup);
  main process no longer forwards app-command, which double-navigated
  on Windows/Linux. Bindings hook moved to use-tab-history with tests.
- useIntentNavigate requires a NavigationProvider again (no silent
  test-shaped fallback); inbox tests mount real providers and assert
  the new modifier-click and context-menu behavior.
- Web scroll restoration: writes are suppressed briefly after a memento
  is served, so clamped restore scrolls can't overwrite or delete it.
- Create-issue dialogs keep the modal open when "Customize fields" is
  modifier-clicked into a background tab.
- Entity row menus share one "Open in new tab" shape (adapter call);
  DataTable click path honors defaultPrevented; ActorAvatar reuses
  useIntentNavigate instead of a fourth copy of the intent switch.
- Search palette: behavioral tests for cmd+click, cmd+Enter, and
  stale-intent reset; navigation mocks repointed at the context module
  so the real hooks stay under test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(navigation): review blockers — tab insertion position and auxclick cell shielding

- openTab inserts the new tab immediately right of the opener (the active
  tab), per MUL-5860 and browser convention, capped at the pinned-first
  boundary. The explicit "+" button (addTab) still appends; a dedupe hit
  focuses without reordering. Regression tests cover all four shapes.
- Issue table interactive cells (pickers, checkboxes, expand/rename/
  create-sub-issue buttons, in-rename capture guard) now stop auxclick
  the same way they stop click, so middle-clicking a control no longer
  bubbles into a background-tab row open. Test asserts controls are
  inert and row dead space still opens.
- Cross-workspace open keeping focus-follows is documented at the
  adapter as a deliberate product exception (MUL-5860): a background tab
  in a non-visible workspace group would give zero feedback.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-10 12:53:51 +08:00
..