v0.21.16.0 feat(workspace): distinguish my workspaces from PRs I'm reviewing#68
Merged
Conversation
…reviewing Adds a single Workspace.Owner field (omitempty, no migration) with a three-state render model: empty derives from SourceKind (pr-sourced -> legacy REVIEW), a foreign login -> reviewing, the reserved self-marker -> explicitly mine. PR-sourced workspaces auto-stamp the PR author at creation (ghx.FetchPR now requests `author`). New SetOwner mirrors SetPin; new `canopy set-owner <ws> <login>|--clear [--on host]` CLI verb. Owner + SourceKind thread through all wire structs (GlobalRow, LsJSONWorkspace, host.RemoteWorkspace, RemoteWorkspaceRow), guarded by a drift test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…nner Renders an @login / REVIEW cyan pill on review rows (text is the primary signal; own rows stay pill-less). `o` opens a modal to set/clear the owner (remote rows dispatch set-owner over SSH); `m` toggles a mine-only filter. Within each host/project section, owned rows sort above review rows. The filter shows an amber "N reviewing hidden" banner so a hidden row never reads as missing data. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The Workspaces tab now tells your own work apart from workspaces you spun up to review someone else's PR. Review rows get an owner pill (
@loginor genericREVIEW); your own rows stay quiet.The key insight: you never create a fresh worktree from your own PR, so
canopy new --pr <n>is itself the "I'm reviewing this" signal. Built on a singleOwnerfield with a three-state render model and no schema migration.How it works
canopy new --pr <n>stamps the PR author at creation (ghx.FetchPRnow requestsauthor). No manual step.@login(known author) ·REVIEW(legacy pr-sourced, author not captured) · nothing (yours). Cyan; the text carries the meaning (colorblind/no-color safe).oopens a modal (set / ⌃d clear / Esc cancel; empty submit rejected).canopy set-owner <ws> <login>|--clear [--on <host>]from the CLI. Remote rows dispatch over SSH, project-pinned.mtoggles "mine only" with an amberN reviewing hiddenbanner so a filtered row never reads as missing data.Owner+SourceKindthread throughGlobalRow,LsJSONWorkspace,host.RemoteWorkspace, and theRemoteWorkspaceRowcache, with a drift-guard test across all of them.Data model
Additive
omitemptyfield — existingstate.jsonrows read back as yours (or a legacyREVIEWrow if pr-sourced) with zero render-time network calls.Reviewed
Ran through
/plan-ceo-review->/plan-eng-review->/plan-design-reviewbefore implementation. Codex outside-voice pass caught theGlobalRowrender carrier + the on-disk cache struct, both folded in. Dogfood-tested live (them-filter banner was added in response to that testing).Tests
Derive logic (all 4 states), owner normalization (every reject path), legacy-row compat, creation stamping,
SetOwnerset/clear/not-found, the 5-struct wire drift guard, sort (incl. section isolation), themfilter + hidden-count, and the pill render.go test ./...green (20 packages);go vetclean.Deferred (TODOS.md)
Hard-refresh (re-run all detectors + re-detect owner), search-by-owner, and the skip-self
gh whoamioptimization.🤖 Generated with Claude Code