Skip to content

Native: prompt links (AP-PROMPTLINKS) #111

Closed

Description

@rynfar

Port prompt links (ledger row AP-PROMPTLINKS, the last todo row) into the native client. First slice; the row may stay partial.

Web source: apps/web/src/components/promptLinks/ (copyPromptLink.ts, linkedPrompt.ts, NewThreadLinkView.tsx, ThreadLinkPrompt.tsx), packages/shared/src/promptLinks.ts, packages/client-runtime/src/promptLinks.ts (+ their tests), and the call sites in CommandPalette.tsx, chat/TimelineUserMessageRow.tsx, routes/_chat.new.tsx, routes/_chat.tsx, desktop/DesktopWebLinkCoordinator.tsx.

Scope:

  • Pure crates/core module: build/parse/sanitize links, app-path and deep-link mapping, project match by repository, model-selection resolution, local PR-thread match; tests ported from the TS tests.
  • Outgoing: "Copy prompt link" on user message rows; palette "Copy prompt link" and "Copy prompt link with repo and model"; same toasts.
  • Incoming: open t3code-native://new?... and t3code-native://threads/<env>/<thread>?prompt=... (registered in the bundle's Info.plist; the t3code scheme stays with the Electron app) plus hosted https://app.t3.codes/new?... links; new-thread link view (project/PR/model resolution), hidden-character warning, replace-draft confirmation.

Out of scope: HostedPromptLinkLanding (hosted web landing only).

Activity

  1. added this to the M3 Full parity milestone on Nov 3, 2026
  2. added
    parity
    native:feature
    status:in-progress
    on Nov 3, 2026
  3. rynfar commented on Nov 3, 2026

    @rynfar
    OwnerAuthor

    First slice is ready in #115 at 85251e8839932283cd520549d619a22112cf57d8. AP-PROMPTLINKS stays partial.

    Shipped the pure core port/tests, message and palette copy actions, native/hosted URL intake, repository/model selection, local modern PR-thread match, sanitization warning, draft replacement and offscreen verification. All 1,084 native workspace tests, Clippy, theme/parity/conformance checks passed.

    Remaining gaps:

    • Project/PR discovery searches the connected environment only; it does not search all saved environments.
    • Per-environment pullRequests.linkedThreads RPC lookup is not wired, so PR threads omitted from the local shell are missed.
    • Clone from the missing-repository page is not implemented.
    • Unlinked PR checkout/setup handoff is not implemented; use without project stages the PR URL instead.
    • Existing native shell decoding supplies modern pullRequests only; legacy single linkedPullRequest payloads remain unsupported.

    OS URL delivery was intentionally not registered/launched, and multiple-environment switching and scratch fallback writes were not exercised. CLI/snapshot links, draft replacement, hidden-character warning, and intercepted copy outputs were verified without clipboard writes or paid turns.

    Local PNG paths and the full validation details are in the PR body under /private/tmp/t3-prompt-links-111/.

  4. added
    status:review
    and removed
    status:in-progress
    on Nov 3, 2026
  5. rynfar commented on Nov 3, 2026

    @rynfar
    OwnerAuthor

    Addressed all three verified P2 findings at 79b3da8324d14f1b3afcff1d1721419223168b9b, rebased onto fork/native at aff9199ee1.

    1. Explicit thread links and local PR-thread links share one navigation path. After select_thread applies the existing visibility policy, a core guard checks the actual selected environment/thread before returning any prompt for placement. Hidden/rejected destinations produce an error page and leave the home draft intact.
    2. Explicit links resolve/connect the saved destination before waiting for shell/config readiness. A newer link resets its connection-attempt state, and placement is scoped to the selected destination. The disconnected-client smoke capture now opens its saved thread rather than staying on Connect.
    3. User-row links flatten validated local context references into sanitized readable labels before checking length/building the URL, matching TimelineUserMessageRow.tsx. The context-only terminal case arrives as sendable prose with no referenced records.

    The three regressions failed with the old behavior and pass after the fixes. All 1,087 native workspace tests, workspace/all-target Clippy, snapshot build/Clippy, theme/parity/conformance checks, and vp run check:changed fork/native passed. No server writes, paid turns, system URL registration, clipboard writes, or reserved #112/#74 file edits.

    Local offscreen evidence, fixtures and reproduction commands: /private/tmp/native-111-review-evidence/ (reproduce.sh, hidden.json, context.json, disconnected-before.png, disconnected-after.png, hidden-explicit.png, hidden-pr.png, hidden-draft-preserved.png, context-copied.png, context-copied.txt, probe.log). Captures were inspected. Context clipboard output is https://app.t3.codes/new?prompt=Terminal+1+lines+4-9.

    The deliberate gaps remain unchanged: clone, unlinked PR checkout, server PR lookup, discovery across saved environments and legacy single PR payloads. OS scheme delivery, switching between multiple real environments, and scratch-project writes were not exercised. The ledger stays partial.

  6. rynfar commented on Nov 3, 2026

    @rynfar
    OwnerAuthor

    Merged first slice in #115 after the exact-head integrated gate (1,097 tests) and clean independent Sol re-review. AP-PROMPTLINKS is now partial, not todo. Remaining gaps: repository/PR discovery across saved environments, per-environment pullRequests.linkedThreads RPC lookups, missing-repository cloning, unlinked PR checkout/setup handoff, and legacy single linkedPullRequest decoding. OS scheme delivery, multiple real environments, and scratch fallback writes remain unverified. Explicit Replace behavior follows the web reference. Existing fixes cover rejected destinations, disconnected saved-environment switching, and portable context-only copied text.

  7. removed
    status:review
    on Nov 3, 2026
  8. added
    status:in-progress
    and removed
    status:in-progress
    on Nov 19, 2026
  9. rynfar commented on Nov 19, 2026

    @rynfar
    OwnerAuthor

    Closed by PR #430 (merged to fork/native at b744abbf61): AP-PROMPTLINKS unlinked PR checkout/setup handoff and legacy single linkedPullRequest shell decoding implemented and verified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    native:featureparity

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions