Skip to content

feat(workspaces): pick a recent folder in New workspace - #829

Merged
devswha merged 6 commits into
mainfrom
feat/recent-workspace-folders
Oct 11, 2026
Merged

devswha merged 6 commits into
mainfrom
feat/recent-workspace-folders

Conversation

@devswha

@devswha devswha commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Change

Closes #640. Supersedes #652: @od-studio-webagency's commit is carried over onto current main with its authorship, and one commit on top changes two things.

New workspace shows the PC's recent folders as chips under Directory, so a project whose panes were closed can be picked again without typing its path or browsing to it.

  • History is per PC, kept in this browser (localStorage). It is seeded from the folders of the panes a connected PC has open, and survives closing them and reloading.
  • Only a successful start moves a folder to the front; a failed or partly failed start changes no order. A folder merely seen in a pane goes behind what is kept: a pane's folder follows every cd of its shell (checked on an isolated herdr), so in front it would fill the three chips with wherever a shell has been.
  • New tab keeps its workspace's folder and shows no chips.

Changed from #652:

  1. A chip fills Directory and starts nothing. In feat(workspaces): reopen recently used folders #652 a click created the workspace at once, with no chance to change the agent or the name, or to take back a wrong click.

  2. Three chips, on one row. feat(workspaces): reopen recently used folders #652 wrapped every stored folder into a scroll area of up to four rows. The dialog now shows the three most recent; a short name is shown whole and a long one gives way to an ellipsis. The stored history is not capped: capping it at three would reorder the list on every snapshot once a PC has four folders open.

  3. No hint under the chips. The line explaining a click is gone; the chips and their tooltips say it.

No server change.

Validation

  • bun run typecheck: pass
  • bun test src/lib/recent-directories.test.ts src/lib/i18n.test.ts scripts/ci-browser.test.ts: 32 pass (the Turkish dictionary added in feat(i18n): add Turkish (tr) translation #815 has the three strings)
  • bun run check run --build bun scripts/recent-folders-regression.ts (Chrome, the test herdr session): pass at 1440, 1920 and 390 px in dark and light. It checks that four stored folders show three chips on one row without overflow, that a chip sets Directory and sends no request, then Start, pending, a failed start and a partly failed start. The script is added to scripts/ci-browser.sh.

Not run locally: the whole unit and browser lanes.

od-studio-webagency and others added 2 commits October 12, 2026 03:20
A chip puts its folder in Directory and starts nothing, so the agent and the
name can still be changed before Start. The dialog shows the three most recent
folders on one row: a short name is shown whole and a long one is cut with an
ellipsis. The stored history is unchanged.
@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 1 minute.

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: fe19a024-1f4e-4b34-ba72-b3f3ea58590c

📥 Commits

Reviewing files that changed from the base of the PR and between 3291eb4 and 30ab300.


📒 Files selected for processing (15)
  • CHANGELOG.md
  • DESIGN.md
  • docs/development.md
  • scripts/ci-browser.sh
  • scripts/ci-browser.test.ts
  • scripts/recent-folders-regression.ts
  • src/App.tsx
  • src/components/NewSessionDialog.css
  • src/components/NewSessionDialog.tsx
  • src/lib/i18n.ja.ts
  • src/lib/i18n.ko.ts
  • src/lib/i18n.tr.ts
  • src/lib/i18n.zh.ts
  • 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
devswha merged commit 620b9d4 into main Oct 11, 2026
9 checks passed
@devswha
devswha deleted the feat/recent-workspace-folders branch October 11, 2026 18:56
devswha added a commit that referenced this pull request Oct 11, 2026
…lders (#844)

## 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](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <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.

feat(workspaces): reopen recent folders from the new workspace dialog

2 participants