Skip to content

feat(swift-ios): add swipe-down command palette - #6146

Draft
saphid wants to merge 1 commit into
pingdotgg:t3code/rebuild-mobile-app-swiftfrom
saphid:agent/swiftui-command-palette-extracted
Draft

feat(swift-ios): add swipe-down command palette#6146
saphid wants to merge 1 commit into
pingdotgg:t3code/rebuild-mobile-app-swiftfrom
saphid:agent/swiftui-command-palette-extracted

Conversation

@saphid

@saphid saphid commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

What

Adds a native swipe-down command palette with recent threads, projects, new-task, add-project, and settings actions.

Scope

This is the single extracted feature commit: the palette model, palette view, WorkspaceView presentation gesture, and its focused tests. It excludes the surrounding personal release history.

Verification

  • FeatureCommandPaletteTests: 5 tests passed
  • Exact extracted head: signed simulator build succeeded
  • Integrated simulator smoke: connected to the seeded showcase backend and rendered the current Home thread list
  • The simulator HID driver cannot emit touch-move events for this top-edge gesture, so physical-phone gesture acceptance remains the visual gate

Dependencies and gate

Note

Add swipe-down command palette to iOS workspace view

  • Adds a command palette sheet to WorkspaceView triggered by a downward drag gesture starting within 88pt of the top edge with at least 72pt of vertical travel.
  • The palette (FeatureCommandPaletteView) supports two modes: a root view with actions and search across projects and threads, and a project picker for "New task in…" navigation.
  • Search results are scored and ranked using token-based matching across title, detail, and search terms fields; prefixing the query with > filters to actions only.
  • Selecting an action routes to the appropriate handler in WorkspaceView: opening a thread, switching to a project, starting a new task, or presenting the add-project or settings sheets.
📊 Macroscope summarized 2293598. 3 files reviewed, 0 issues evaluated, 0 issues filtered, 0 comments posted

🗂️ Filtered Issues

No issues evaluated.

@coderabbitai

coderabbitai Bot commented Aug 11, 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: bde9bf29-5764-4cb5-9b51-88b76b8e752c

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

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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:XL 500-999 changed lines (additions + deletions). labels Aug 11, 2026
}

private static func threadItems(snapshot: FeatureSnapshot) -> [FeatureCommandPaletteItem] {
let projectsByID = Dictionary(uniqueKeysWithValues: snapshot.projects.map { ($0.id, $0) })

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.

🟠 High Workspace/FeatureCommandPaletteModel.swift:266

threadItems builds projectsByID with Dictionary(uniqueKeysWithValues:), which traps when the snapshot contains two projects with the same id. Legacy aggregate snapshots can include cloned projects from multiple environments sharing an unscoped id, so presenting or searching the command palette with such a cached snapshot crashes the app. Consider using a duplicate-tolerant lookup (e.g. Dictionary(_:uniquingKeysWith:) or scoping by environment) instead.

🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/swift-ios/Features/Workspace/FeatureCommandPaletteModel.swift around line 266:

`threadItems` builds `projectsByID` with `Dictionary(uniqueKeysWithValues:)`, which traps when the snapshot contains two projects with the same `id`. Legacy aggregate snapshots can include cloned projects from multiple environments sharing an unscoped `id`, so presenting or searching the command palette with such a cached snapshot crashes the app. Consider using a duplicate-tolerant lookup (e.g. `Dictionary(_:uniquingKeysWith:)` or scoping by environment) instead.

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

Labels

size:XL 500-999 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