β¨ feat(device): switch device cwd handling to structured workingDirs#15353
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
π‘ Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5bb06bc340
βΉοΈ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with π.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codecov Reportβ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## canary #15353 +/- ##
==========================================
- Coverage 70.85% 70.85% -0.01%
==========================================
Files 3255 3256 +1
Lines 321270 321282 +12
Branches 29340 29340
==========================================
+ Hits 227640 227647 +7
- Misses 93448 93453 +5
Partials 182 182
Flags with carried forward coverage won't be shown. Click here to find out more.
π New features to boost your workflow:
|
5bb06bc to
b29cd81
Compare
8ee8dd8 to
0752b4e
Compare
b29cd81 to
6ba3300
Compare
Consume the `working_dirs` column: model `updateDevice`, tRPC `updateDevice`
input + `listDevices` output, and the client cwd pickers now operate on
`WorkingDirEntry[]` instead of the flat `recentCwds: string[]`.
- model / tRPC: `workingDirs` (input capped at 20, validated `{ path, repoType? }`)
- client `deviceCwd`: `nextRecentCwds` β `nextWorkingDirs`
- UI: DeviceWorkingDirectory / WorkingDirectory / DeviceDetailPanel / DeviceItem
render the detected repo type via the shared `renderDirIcon`
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
6ba3300 to
9448742
Compare
π» Change Type
π Related Issue
The DB layer (
working_dirscolumn +WorkingDirEntry) is already oncanary(landed via the workspace-id migration batch). This PR is the consumer layer.π Description of Change
Switch device cwd handling from the flat
recentCwds: string[]toworkingDirs: WorkingDirEntry[]({ path, repoType?: 'git' | 'github' }), backed by theworking_dirscolumn already oncanary.updateDeviceinput,listDevicesoutput): useworkingDirs(input capped at 20, validated{ path, repoType? })listDevices: coalesces the nullableworking_dirsread to[]so the API contract stays an always-arraydeviceCwd:nextRecentCwdsβnextWorkingDirsoverWorkingDirEntryDeviceWorkingDirectory,WorkingDirectory,DeviceDetailPanel,DeviceItemrender the detected repo type via the new sharedrenderDirIconπ§ͺ How to Test
π Additional Information
recent_cwdsremains on the table as a@deprecatedlegacy column; this PR stops reading/writing it. A later cleanup can drop the column.