Repository navigation
fix(sidebar): pin only the repository workspace row - #1235
Merged
Merged
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 12 minutes. View limit details
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 |
Owner
Author
|
@coderabbitai review |
|
devswha
added a commit
that referenced
this pull request
Oct 16, 2026
## Change Workspace pins are favorites: add a childless shortcut in the pinned card, but keep the full repository tree below unchanged, including pinned heads and pinned worktrees. - Keep drag, touch long-press and Alt+Up/Down reordering inside the card; cross-card drops do nothing. - Let every tree row reorder through herdr normally, regardless of favorites. - Give shortcuts separate DOM/reorder identities while keeping the underlying workspace and selection shared. Restore focus to the originating row, or its surviving tree row when unpinning a shortcut. - Keep shortcuts visible when their repository is collapsed, and open rename only on the row used. - Preserve pin keys, pin order, pruning and preference sync. - Update DESIGN.md and consolidate the unreleased #1233/#1235 notes into one final-behavior `### Changed` fragment. Owner: pins-favorites worker. Branch: `fix/pins-as-favorites`. Worktree: `/tmp/tmp.IJc2hmd83H/wt`. Start SHA: `811a4b9c`. Dependencies: none. Status: implemented and locally verified. ## Validation Every command used a private temporary/cache environment: ```sh export TMPDIR=/tmp/tmp.IJc2hmd83H export NODE_COMPILE_CACHE="$TMPDIR/node-compile-cache" export BUN_RUNTIME_TRANSPILER_CACHE_PATH="$TMPDIR/bun-transpiler" cd "$TMPDIR/wt" ``` ### Unit: fail before / pass after Updated the existing split expectations before changing the implementation. Command: ```sh bun test src/lib/sidebarPins.test.ts ``` Before, on the original implementation at `811a4b9c`: ```text (fail) adds favorite shortcuts without removing pinned heads or worktrees from the tree (fail) keeps the full repository tree in source order when its head is a favorite (fail) reorders favorite shortcuts and unpins a head without changing the original tree 11 pass 3 fail UNIT_BEFORE_EXIT=1 ``` After: ```text 14 pass 0 fail 33 expect() calls Ran 14 tests across 1 file. ``` ### Browser regressions: fail before / pass after Both scripts ran exclusively through the isolated wrapper, with `CHECK_MAX_RUNS=3`. They build the real client over disposable demo fixtures, not the user's live session. ```sh CHECK_MAX_RUNS=3 bun run check run --build bun scripts/sidebar-activity-demo-regression.ts CHECK_MAX_RUNS=3 bun run check run --build bun scripts/workspace-touch-reorder-demo-regression.ts ``` Before, with the new intact-tree assertions on the original implementation: ```text sidebar-activity-demo-regression.ts: AssertionError: favorites keep the complete repository tree unchanged FAILED run (7.9s) ACTIVITY_BEFORE_EXIT=1 workspace-touch-reorder-demo-regression.ts: AssertionError: favorites keep every repository head in the normal tree actual: [ "w2t", "w1E", "w1F", "w1G", "w2s" ] expected: [ "w1D", "w1C", "w1E", "w1F", "w1G", "w2s" ] FAILED run (9.3s) REORDER_BEFORE_EXIT=1 ``` After, on the final source: ```text sidebar-activity-demo-regression.ts: PASS repository favorites add only a shortcut and preserve the full movable tree on desktop and phone ok build (5.5s) ok run (37.7s) ACTIVITY_AFTER_EXIT=0 workspace-touch-reorder-demo-regression.ts: PASS touch long press and Alt+Up/Down reorder favorites within the card, preserve the complete tree and herdr order, and survive reload PASS desktop drag and Alt+Up/Down reorder favorites within the card, preserve the complete tree and herdr order, and survive reload ok build (6.9s) ok run (17.9s) REORDER_AFTER_EXIT=0 ``` The activity regression additionally covers pinned worktrees staying nested, shortcut reorder, collapsed-tree shortcuts, shared selection/aria-current, distinct DOM IDs, pin/unpin focus return, normal sibling reorder, and no duplicate rename editors. It runs the favorite scenario in dark and light themes at 1280px desktop and 390px phone widths. The reorder regression covers touch and desktop card reorder, both directions across the card edge, normal tree reorder of a favorite repository with its worktree, unchanged shortcut order during tree moves, and saved pin order after reload. Both final wrapper reports have `status: success`, exit code `0`, `verification.status: verified`, `source.unchanged: true`, and matching source fingerprints: `ca8c8902503bebee7ed8c89389698e393204e4ee283bdadc4ab32c52c7f39435`. Report IDs: `c46725d8-fd97-40a0-84bf-eb80bdccf25e` and `644af18e-15f8-4d64-ae40-dad2875e6513`. The scripts independently build their demo client from source; the wrapper's generic `browserCurrentSource` field is `not-claimed`. ### Other checks ```sh bun run typecheck bun test src/lib/sidebarPins.test.ts src/conventions.test.ts server/conventions.test.ts scripts/conventions.test.ts scripts/changelog-fold.test.ts git diff --check ``` ```text $ tsc --noEmit && tsc --noEmit -p tsconfig.tools.json FINAL_CHECKS_EXIT=0 51 pass 0 fail 123 expect() calls Ran 51 tests across 5 files. ``` Screenshots inspected directly: `/tmp/tmp.IJc2hmd83H/evidence/` (desktop/phone, light/dark, plus card reorder). Full command logs: `/tmp/tmp.IJc2hmd83H/{unit,activity,reorder}-{before,after}.log` and `final-tests.log`. Native gate-review spawning was unavailable because this worker is already at the session's maximum subagent depth; the final diff was reviewed directly instead. Full CI and native Windows checks were not run locally. The production build retains its existing large-chunk warning. Context decisions: a removed shortcut returns focus to its tree row; if that worktree was hidden, expand its repository to make the focus target visible. Preserve the existing group-move contract that moves a repository's worktrees alongside it in herdr order.
devswha
added a commit
that referenced
this pull request
Oct 16, 2026
## Change Workspace pins move again instead of acting as favorites. #1237 kept every pinned workspace in the tree and added a shortcut to the card, so a pinned worktree showed twice. Paseo, Codex and T3 Code all move a pinned item into the pinned section, and the pin unit here is one herdr workspace, as a thread is in T3 Code. This reverts #1237 only, which restores the #1235 behavior: - A pinned workspace leaves the tree and shows only in its PC's pinned card, in pin order. - Pinning a repository workspace moves only its row. Its unpinned worktrees stay at the group's position, in order and fixed, until the repository is unpinned. - A pinned worktree leaves its repository's group, which stays. - Drag, touch long-press and Alt+Up/Down still reorder the card by pin order (#1233). DESIGN.md, the unit tests, both browser regressions and the changelog fragments (`pin-repository-row-only.md`, `pinned-workspace-reorder.md`) return to their #1235 state; `workspace-favorites.md` is removed. The revert applied cleanly on top of #1241. ## Validation - `bun run typecheck`: pass. - `bun test src/lib/sidebarPins.test.ts src/conventions.test.ts server/conventions.test.ts scripts/conventions.test.ts scripts/changelog-fold.test.ts`: 52 pass, 0 fail. - `CHECK_MAX_RUNS=3 bun run check run --build bun scripts/sidebar-activity-demo-regression.ts`: 8 PASS, including "a repository pin keeps only its row in the card; its worktrees stay outside, fixed and ordered, and regroup on unpin, on desktop and phone". - `CHECK_MAX_RUNS=3 bun run check run --build bun scripts/workspace-touch-reorder-demo-regression.ts`: 4 PASS (touch and desktop card reorder, unpinned worktrees fixed outside, reload). - `git diff --check`: clean. The browser regressions ran on demo fixtures before the rebase onto #1241, which touches none of these files; typecheck and unit tests were re-run after it. Full CI and native Windows were not run locally.
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.
Change
### Changedchangelog fragment.Coordination: owner
devswha/ pin-row worker; scope sidebar pin splitting, fixed rows, regression,design and changelog; branch
fix/pin-repository-row-only; worktree/tmp/tmp.m0EeHuAUMy/wt;start SHA
cda4190ffef993dd4c3dc7b46fa4b5ce70f738ff; dependencies none; verification below;status implemented, ready for review. No merge requested.
Validation
All commands used the task-owned temporary/cache environment:
Unit regression: fail before / pass after
Command:
bun test src/lib/sidebarPins.test.tsBefore: the new head-pinned expectations against the unchanged implementation at the start SHA:
The pinned head incorrectly retained its children, and the rest list omitted those children.
After:
Coverage also checks mixed head/worktree pins, pin order, absent IDs, restoring groups, and fixed IDs for head pins versus worktree-only pins.
Isolated browser regression: fail before / pass after
Command:
bun run check run --build bun scripts/sidebar-activity-demo-regression.tsBoth runs used the isolated wrapper and fictional demo transport, never a live user session.
Before:
After:
The new scenario creates two linked worktrees, pins the head through the real row menu,
checks card contents and standalone ordering, verifies drag/shortcut restrictions and an
actual Alt+Down attempt, then unpins and verifies nesting is restored on desktop and phone.
Optional screenshots are saved outside the worktree with
UI_EVIDENCE_DIR.Additional checks
bun run typecheck— passed (application and critical tooling).bun test ./src/conventions.test.ts ./scripts/conventions.test.ts ./server/conventions.test.ts scripts/changelog-fold.test.ts— 37 pass, 0 fail.git diff --check— passed.Full integration, the full browser lane and native Windows checks were not run locally;
this change was checked with the targeted isolated browser regression.
Local evidence root:
/tmp/tmp.m0EeHuAUMy/(unit-before.log,unit-after.log,browser-before.log,browser-after-final.log,typecheck.log,conventions.log).Final wrapper report:
node_modules/.cache/check/33b1d96f-693f-4f1f-b10c-1c70f87afdb6/report.jsonrecords success, exit code 0, unchanged source and a build made by that run.
The gate-reviewer spawn was refused by this worker's subagent nesting limit; the diff was
self-reviewed, but no independent reviewer approval is claimed.