feat(web): show thread shortId across main app surfaces#254
Conversation
Surfaces the per-org thread shortId in the threads inbox, breadcrumbs (thread + archive), thread chips, related threads, search results, and the playground sidebar. Inbox keeps the id before the avatar; everywhere else it trails the title as muted "#123". Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
📝 WalkthroughWalkthroughDisplay of thread short identifiers (prefixed with Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/web/src/routes/app/_workspace/_main/playground/index.tsx`:
- Around line 106-129: Remove the unsafe "as any[]" casts around threads: use
the inferred typed value from useLiveQuery (threads) directly by replacing the
casts with proper null-coalescing/optional chaining; e.g., use threads?.map(...)
or (threads ?? []).map(...) for the mapping and change the empty check to use
threads?.length or (threads ?? []).length (e.g., (threads?.length ?? 0) === 0)
so handleSelectThread, selectedThreadId, and the button rendering keep strict
typing without any "as any[]" assertions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 5fe992ab-9516-40c5-b3e1-8d292c8ce51b
📒 Files selected for processing (7)
apps/web/src/components/chips.tsxapps/web/src/components/threads/related-threads-section.tsxapps/web/src/routes/app/_workspace/_main/playground/index.tsxapps/web/src/routes/app/_workspace/_main/search/index.tsxapps/web/src/routes/app/_workspace/_main/threads/$id/index.tsxapps/web/src/routes/app/_workspace/_main/threads/archive/$id.tsxapps/web/src/routes/app/_workspace/_main/threads/index.tsx
There was a problem hiding this comment.
No issues found across 7 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Auto-approved: This is a low-risk UI enhancement that surfaces an existing data field (shortId) across several application views. It contains no core logic changes, migrations, or architectural shifts.
Summary
shortIdin the main-app UI now that it's used in URLs but never visible.#123muted before the avatar; chips, breadcrumbs (thread + archive), related threads, search results, and the playground sidebar show it muted after the title.shortId(legacy rows) render nothing — no placeholder, no extra spacing.Test plan
#123appears muted before the avatar; legacy threads render cleanly.Thread name #123.Thread name #123.Name #123.#123after each name.#123after each thread name.#123after each thread name.bun run --filter web typecheckpasses.🤖 Generated with Claude Code
Summary by cubic
Show the per-org thread shortId across the app so the URL ID is visible. Displays a muted “#123” near thread titles and hides it for legacy threads.
New Features
#123before the avatar.shortIdis null.Bug Fixes
Written for commit e072ce9. Summary will update on new commits. Review in cubic
Summary by CodeRabbit