Skip to content

mac: clickable links in the preview — consumer of display-list-v2-links (#323, step 1) - #333

Merged
GoKubar merged 2 commits into
mainfrom
agent/daniel-parent/links-mac-consumer
Sep 14, 2026
Merged

GoKubar merged 2 commits into
mainfrom
agent/daniel-parent/links-mac-consumer

Conversation

@d-q222

@d-q222 d-q222 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Lane daniel-parent (Max 20x, mac-m5pro-dq222; not daniel-vpclaude), claim GH-323. The Commander assigned the lane on #2 at 05:53Z and approved this extra Cursor worker at 06:08Z.

What

The Mac consumer of protocol/proposals/display-list-v2-links.md. Once a producer emits navigation, \href/\url are clickable in the preview. Until then it's inert: no producer echoes the capability yet, so nothing changes for users.

file change
FlashTeXProtocol/RenderingV2.swift decodes the optional §3 navigation object (links, destinations, outline, info)
FlashTeXProtocol/RenderingV2Fast.swift the fast decoder parses navigation instead of skipping it as an unknown key
DisplayListDelta.swift delta reconstruction carries navigation through
DisplayListLinks.swift pure capability gating, tick-space hit-testing, scheme allowlist, action(for:)
PreviewV2View.swift pointing-hand cursor and URI tooltip over links; link hit-test runs before source hit-test
PreviewAnchor.swift a reveal scroll for internal destinations, separate from caret-follow
ShellModel.swift requests display-list-v2-links only together with display-list-v2; opens allowlisted URIs through NSWorkspace

Safety

  • Gating: a live frame honours navigation only when the producer echoed the capability.
  • An unaccepted capability is harmless: the preview controller reports it as missing_layout_capabilities (crates/preview-controller/src/lib.rs), and the app only logs that (ShellModel+Controller.swift:512). There's no v1 fallback, and live v2 tests pass with the capability sent.
  • URI allowlist: http, https, mailto. file:, javascript: and schemeless URIs are rejected.
  • Untouched: crates/, vendor/, frozen schemas and contracts, and the editor (IDE: syntax highlighting and completion are absent when the editor first gets focus; appear after switching files and back #280 area).

Tests

  • daniel-parent, own run (FLASHTEX_NO_ACTIVATE=1): DisplayListLinksTests 9/0, PreviewV2Tests 8/0, RenderingV2Tests 14/0, DisplayListDeltaTests 5 (4 skipped)/0, V2ImageTests 9 (1 skipped)/0. 45 executed, 5 skipped, 0 failures. The skips need FLASHTEX_RENDER/FLASHTEX_COMPILER helpers.
  • Worker: the same filters on control c02fcb9f gave 22 executed, 0 failures; PreviewV2LiveTests 7/0 afterwards.
  • Fixture: Tests/FlashTeXMacTests/Fixtures/display-list-v2-links.json, written from the proposal's examples.

Gaps and follow-ups

Provenance

cursor-agent cursor-grok-4.6-high-fast, checkpoint 4483f500. daniel-parent reviewed the gating, the missing-capability path and the allowlist, and re-ran the tests.

Decode the proposal §3 navigation object (tolerant of absence) on both
v2 readers, request the capability only with display-list-v2 (setLiveV2
and configure_layout), and hit-test link rects in a pure type. Clicks
open http/https/mailto via NSWorkspace and scroll internal destinations;
file: and javascript: are rejected.

Control on unmodified c02fcb9: Selected tests 22 executed, 5 skipped,
0 failures (PreviewV2Tests 8/0, DisplayListDeltaTests 5 executed 4 skipped,
V2ImageTests 9 executed 1 skipped). DisplayListCompact tests are not on
this main.

After: DisplayListLinksTests 9 executed 0 failures; existing suites still
green (PreviewV2Tests 8/0, PreviewV2LiveTests 7/0, DisplayListDeltaTests
5/4 skipped, V2ImageTests 9/1 skipped). RenderingV2Tests 14/0.
swift build: Build complete! (0.36s)

Next: pipeline producer (issue step 2) after #131; no outline sidebar.

Implementation-Agent: cursor-agent cursor-grok-4.6-high-fast
Commit-Executor: cursor-agent
Lane-Owner: daniel-parent (mac-m5pro-dq222)
Co-authored-by: Cursor <cursoragent@cursor.com>
@d-q222

d-q222 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

daniel-parent overlap heads-up: #367 (display-list-v2-window, draft on #294) and #333 (clickable links, the Mac consumer of display-list-v2-links; ready, merges cleanly with main) conflict in PreviewAnchor.swift, PreviewV2View.swift, ShellModel.swift, RenderingV2.swift and RenderingV2Fast.swift. #367 merges cleanly with my #345 and #363. #333 is older, not stacked, and not a draft, so I suggest it lands first and #367 rebases onto it. If #367 lands first instead, I'll rebase #333 myself. Either way it's one rebase, not two.

@d-q222

d-q222 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

daniel-parent Mac pre-merge verification (for the integration lane, which has no Swift toolchain). Xcode 26.6, macOS 26.6, merged onto origin/main 98ca402a in a throwaway worktree, PR head 4483f500. Worker: Cursor; results checked by daniel-parent.

PR merge filtered tests full suite verdict
#333 CLEAN 18 / 1 skipped / 0 fail 1067 / 134 skipped / 3 fail (pre-existing WordCount) READY

About the 3 full-suite failures: WordCountModelTests.testOnlyTheLastScheduledUpdateWins and testScheduleUpdateEventuallyPublishesTotals fail in every full run, including the control on main, while the machine is loaded. Run alone on main 095e8406 they pass twice (2/0), so they're timing-flaky under full-suite load, not caused by this PR or broken on main.

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