Skip to content

fix(new-workspace): leave worktrees and temp folders out of recent folders - #844

Merged
devswha merged 3 commits into
mainfrom
fix/recent-folders-skip-worktrees-and-temp
Oct 11, 2026
Merged

devswha merged 3 commits into
mainfrom
fix/recent-folders-skip-worktrees-and-temp

Conversation

@devswha

@devswha devswha commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Problem

Mobile testing of 0.4.7's recent folders (#652/#829): the chips filled with worktree checkouts and /tmp panes, because the list also learns from every pane's cwd. Only three chips fit, so the projects themselves were pushed out.

Change

  • passingFolder(path, worktrees) in src/lib/recent-directories.ts: herdr's worktree directory (/.herdr/worktrees/), a PC's open linked worktrees (workspace.worktree.checkout_path), and temporary directories (/tmp, /private/tmp, /var/tmp, /var/folders/…, Windows AppData/Local/Temp).
  • App no longer remembers the folders of panes in linked-worktree workspaces or matching passingFolder.
  • NewSessionDialog hides kept folders that match (history from before this change), and shows up to 8 chips instead of 3.
  • CSS: chips wrap on a wide screen; at ≤640px or on a coarse pointer they stay on one row that scrolls sideways (scroll-snap, no scrollbar), each chip capped at 12rem.

Tests

  • Unit: passingFolder cases in recent-directories.test.ts.
  • recent-folders-regression (1440/1920/390, dark/light): its folders now live under node_modules/.cache instead of the OS temp dir (which would now be filtered); a kept herdr worktree and /tmp folder are left out while a fourth ordinary folder is shown; the phone row stays one row and scrolls (overflow-x: auto).
  • bun run check fast and ui-regression pass.

🤖 Generated with Claude Code

…lders

Recent folders also learn from where panes are, so worktree checkouts
and /tmp shells crowded out the projects. Folders under herdr's
~/.herdr/worktrees, a PC's linked worktrees and temporary directories
are no longer remembered from panes, and ones kept before are not
shown. Up to eight chips are offered: one swiped row on a phone, rows
that wrap on a wider screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You'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 25 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: devswha/herdr-web-ui/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bc650f20-a298-45df-87c7-fd75a9581bb9

📥 Commits

Reviewing files that changed from the base of the PR and between 76875d9 and 1fadfc1.


📒 Files selected for processing (7)
  • CHANGELOG.md
  • scripts/recent-folders-regression.ts
  • src/App.tsx
  • src/components/NewSessionDialog.css
  • src/components/NewSessionDialog.tsx
  • src/lib/recent-directories.test.ts
  • src/lib/recent-directories.ts

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

devswha and others added 2 commits October 12, 2026 07:20
… compare Windows roots alike

Review findings (Codex, pre-merge): the dialog filtered kept folders
without the PC's linked worktree roots, so a checkout remembered before
this change stayed a chip; a Windows root kept its backslashes while the
candidate had none, so a folder under it passed. The dialog now gets the
roots from the PC's snapshot, and roots go through the same lexical form.

The regression's fixtures move from node_modules/.cache to the home's
cache: under one of herdr's worktrees that folder is itself one recent
folders leave out, which made the script time out there.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@devswha
devswha merged commit 1675499 into main Oct 11, 2026
9 checks passed
@devswha
devswha deleted the fix/recent-folders-skip-worktrees-and-temp branch October 11, 2026 22:28
devswha added a commit that referenced this pull request Oct 11, 2026
… screens (#848)

## Why
Follow-up to #844, from the user's review: on a desktop, up to eight
recent-folder chips wrapped onto two or three rows. They asked for a
tidier layout and picked "one row + a +N chip".

## Change
- New `RecentFolderChips` (used by `NewSessionDialog`):
- phone (`≤640px` or coarse pointer): unchanged, one row swiped
sideways;
- wider screen: a hidden measuring row gives each chip's width;
`chipsThatFit` keeps as many as fit with room for a `+N` chip
(re-measured on resize and once fonts load). `+N` opens a `RowMenu`
listing the rest (basename + full path); picking one fills Directory
like a chip.
- `RowMenu`:
- `variant="paths"`: wider menu, the path hint shrinks with an ellipsis
before the label does;
- a popover opened from inside an `aria-modal` surface gets
`is-over-modal` (z-index above `--z-modal`), so it is no longer drawn
behind the dialog.
- i18n: `{n} more recent folders` in ko/ja/zh/tr.
- CHANGELOG: the unreleased #844 entry rewritten to describe the final
layout.

## Tests
- Unit: `chipsThatFit`.
- `recent-folders-regression` (1440/1920/390 × dark/light): reads what
the dialog offers as the visible chips plus the `+N` menu, in order;
asserts a wide screen stays on one row and shows `+N` with four folders,
`+N`'s count matches the list, Escape closes the list and not the
dialog, and picks a folder from the menu when its chip is not shown.
- `bun run check fast`, `ui-regression`, `deep-link-demo-regression`,
`sidebar-activity-demo-regression` pass.
- Checked by screenshot at 1440px: three chips + `+4`, the list drawn
over the dialog with paths cut before names.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
devswha added a commit that referenced this pull request Oct 12, 2026
## Change

Release 0.4.8, from main at ca6db6e (20 PRs since v0.4.7: the 0.4.7
mobile walk-through fixes, two contributor PRs and the revived #793).

- `package.json` and `herdr-plugin.toml`: 0.4.8.
- CHANGELOG: `[Unreleased]` becomes `[0.4.8] - 2026-10-12`, with the
compare links. Twelve entries that had no PR link get theirs (#835 #837
#838 #840 #842 #843 #844+#848 #845 #847 #849 #851 #852). A Maintenance
line says the remote-PC runtime is now version 27.
- `release-summaries.json`: 0.4.8 in en/ko/ja/zh/tr (3 new, 6 improved,
8 fixed). The Turkish lines are not checked by a native speaker.
- `REMOTE_BUNDLE_VERSION` 26 -> 27: #836 adds the `pending-hold` server
feature and #787 serves precompressed assets, so `remote-v27` is
published before the app release.

Every PR merged since v0.4.7 is linked in the section: #787 #788 #793
#835 #836 #837 #838 #839 #840 #841 #842 #843 #844 #845 #846 #847 #848
#849 #851 #852.

## Validation

- `bun scripts/release-notes.ts 0.4.8` renders the summaries and the
full changelog (116 lines).
- `bun run check fast`: generated types, typecheck, build and 2800+ unit
tests pass.

## Release

After this merges and its CI on `main` passes: push `remote-v27`, wait
for its release, then run the Release workflow with `0.4.8`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
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