Skip to content

fix(chats): align organization shift-click selection with workspaces - #8389

Merged
waleedlatif1 merged 3 commits into
stagingfrom
codex/org-chat-shift-selection
Sep 28, 2026
Merged

waleedlatif1 merged 3 commits into
stagingfrom
codex/org-chat-shift-selection

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Match organization chat Shift-click selection to workspace chats through the shared selection hook and chat link.
  • Apply context-menu deletion to the selected range, preserve selection in portaled menus, and ignore stale selection anchors from other lists.
  • Keep expanded and collapsed chat selection consistent, and redirect away from deleted chats even when another deletion fails.

Type of Change

  • Bug fix

Testing

  • bun run lint
  • bun run --cwd apps/sim type-check
  • bun run check:audits (51 passed), block registry audit, and docs manifest check
  • bun run --cwd apps/sim test hooks/queries/mothership-chats.test.ts (3 passed)
  • 14 local browser component checks with fixture HTTP responses: range selection, modifier clicks, context-menu cancellation, rename inputs, empty-space clicks, collapsed flyouts, and partial bulk-deletion retries. The original Shift-click behavior and the partial-failure, collapsed-navigation, modifier, and portal fixes were confirmed to fail without their guards.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 28, 2026 9:15pm UTC

Request Review

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 6 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Adds multi-select chat behavior to sidebars.

The PR appears safe to merge; no new actionable issue or outstanding previous finding remains.

Summary

The PR adds shared range selection to organization chats, connects selection in both collapsed flyouts, and tracks successful IDs in partially failed bulk deletions. The two previous findings are manually resolved; the current code also addresses their reported redirect and collapsed-selection behavior.

Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Chat row click] --> B[Shared selection hook]
  B --> C[Selection for current chat list]
  C --> D[Context-menu deletion]
  D --> E[Batch delete]
  E --> F[Successful IDs]
  E --> G[Failed IDs retained for organization retry]
  F --> H[Redirect if the open chat was deleted]
Loading

Reviews (3) · Last reviewed commit: "fix(chats): reconcile partial deletes an..."

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 7 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread apps/sim/app/workspace/[workspaceId]/w/components/sidebar/utils.ts Outdated
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 9 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 3ab8ed0 into staging Sep 28, 2026
32 of 33 checks passed
@waleedlatif1
waleedlatif1 deleted the codex/org-chat-shift-selection branch September 28, 2026 21:28

This branch was previously deployed

1 inactive deployment
Preview — a2026f5d Deployed Sep 28, 2026 by vercel[bot]
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.

1 participant