Skip to content

SwiftUI thread rows: copy thread metadata - #8622

Open
saphid wants to merge 5 commits into
pingdotgg:t3code/rebuild-mobile-app-swiftfrom
saphid:swiftui/pr-140-thread-copy-actions
Open

SwiftUI thread rows: copy thread metadata#8622
saphid wants to merge 5 commits into
pingdotgg:t3code/rebuild-mobile-app-swiftfrom
saphid:swiftui/pr-140-thread-copy-actions

Conversation

@saphid

@saphid saphid commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

What users observed

On the SwiftUI iOS home screen, long-pressing a thread row offered a single coarse copy action. Copying just the thread's metadata (name, project, environment) — the thing you usually want when filing an issue or handing a thread to someone — was not possible without manually editing pasted text.

What changed

  • Thread rows expose individual copy actions: copy the thread name, copy thread metadata (project / environment / workspace root), rather than one all-or-nothing blob.
  • The copy submenu is composed from a single ThreadCopyContext derived from the row's existing presentation context, so each action stays correct as project/environment metadata changes.
  • Metadata copy tests replace the older combined-metadata suite; each action is verified individually, including the environment-less fallback case.

Affected: SwiftUI iOS client only — server, contracts, web/desktop, and React Native are unchanged.

Base: t3code/rebuild-mobile-app-swift at b67837984e5650888b1eed0e1cd7fff83625f696.

UI changes

Before (single copy action, light)

Before — root menu

After (individual copy submenu)

After — copy submenu

Interaction video

Play the menu interaction video

Dark-mode captures and the full set are embedded in the tracking issue.

Intentionally unchanged

  • The rest of the long-press menu (open, rename, archive, …) and its ordering.
  • Web/desktop context menus.

Verification

  • Focused native suite T3CodeTests/ThreadCopyActionsTests (per-action coverage incl. fallbacks) — run on this re-materialized head, iPhone 16 Pro / iOS 26.5 simulator; 10 test cases passed, 0 failed (xcodebuild exit 0).
  • Full app + test-target build for the simulator succeeded (xcodebuild test, exit 0).
  • git diff --check clean.

Known gaps / honest disclosures

  • This branch is a re-materialization of work originally developed and device-verified against an earlier state of the mobile rebuild stack; the captures above are from that accepted head, not from this exact commit. CI on this PR provides the current-head build/test signal.

Affected: SwiftUI iOS client only.


Note

Low Risk
Client-only clipboard and context-menu UI with localized row-context fallback logic; no server or auth changes.

Overview
Home thread long-press menus on iOS now include a Copy submenu with separate actions for path, branch, thread ID, project, environment, and deep link URL, wired through new ThreadCopyModel / ThreadCopyClipboard helpers.

HomeThreadCollectionView passes each row’s HomeThreadRowContext into menuActions; unavailable items stay visible but disabled, and successful copies go to the pasteboard with VoiceOver announcements. HomeThreadRowContext.copyContext maps existing row presentation fields into copy metadata, and blank thread.environmentID values are treated as missing so indexing falls back to the project’s environment (affecting labels and copy/URL fields).

Focused unit tests cover action ordering, raw-value copying, fallbacks, URL encoding, and the placeholder-project edge case.

Reviewed by Cursor Bugbot for commit e90618a. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add 'Copy' submenu to SwiftUI thread row context menus for metadata

  • Adds a 'Copy' submenu to thread context menus with actions for Path, Branch, Thread ID, Project, Environment, and URL, built from thread and row context via ThreadCopyModel.actions(for:context:)
  • Unavailable actions appear disabled; selecting an available item writes the raw value to the pasteboard and posts an accessibility announcement
  • Fixes HomeThreadRowContext.index(snapshot:) to fall back to the project's environmentID when the thread's value is blank
  • HomeThreadRowContext.copyContext omits projectName when no projectWorkspaceRoot exists, avoiding placeholder project entries
  • Risk: blank-environment fallback changes derived environment label and ID for threads whose environmentID was previously blank — see WorkspaceView.swift

Macroscope summarized e90618a.

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ad2ae2ee-0e37-4db9-80d2-c43451fc581b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Aug 29, 2026
Comment thread apps/swift-ios/Features/Workspace/ThreadCopyActions.swift

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 05a8d68. Configure here.

Comment thread apps/swift-ios/Features/Workspace/WorkspaceView.swift
@macroscopeapp

macroscopeapp Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR adds a new user-facing metadata-copy workflow to SwiftUI thread rows and modifies shared row-context fallback behavior across multiple production files. The implementation is tested and localized, but the cross-file integration and changed existing context derivation merit human review.

Notes:

  • No code objects were reviewed. Approvability was decided on eligibility alone.

You can add or adjust custom eligibility rules. Learn more.

Comment thread apps/swift-ios/Features/Workspace/WorkspaceView.swift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant