Skip to content

feat(workspaces): reopen recently used folders - #652

Closed
od-studio-webagency wants to merge 2 commits into
devswha:mainfrom
od-studio-webagency:feat/recent-workspace-directories
Closed

od-studio-webagency wants to merge 2 commits into
devswha:mainfrom
od-studio-webagency:feat/recent-workspace-directories

Conversation

@od-studio-webagency

@od-studio-webagency od-studio-webagency commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Change

Closes #640

  • New workspace에 PC별 최근 폴더 칩을 추가하고 선택한 에이전트로 바로 시작합니다.
  • 닫힌 workspace의 폴더를 보존하고 성공한 시작만 순서를 올립니다. 실패·부분 실패는 중복 생성이나 순서 변경을 만들지 않습니다.
  • 현재 workspace/worktree sidebar, 새 탭 동작, 포커스 트랩을 유지합니다.

Validation

타입·빌드·생성 타입 검사와 집중 테스트 26개 통과. 실제 소유한 workspace로 1440/1920/390px 밝은·어두운 테마에서 종료·reload·PC 구분·선택한 에이전트 payload·pending·실패·부분 실패를 검증했습니다. 에이전트 readiness만 가짜로 제어하여 유료 모델을 시작하지 않았습니다.

전체 단위 실행은 1935 통과·33 생략·1 실패였습니다. 변경하지 않은 server/collector.test.ts의 recovery 타이밍 테스트이며 해당 파일 단독 27개는 통과했습니다. 관련 파일은 이 PR에서 수정하지 않았습니다.

모든 검증은 별도 작업 공간과 소유한 테스트/demo 환경에서 수행했습니다. 사용자의 실행 중 앱·terminal은 변경하지 않았습니다.

화면 증거

개인 대화나 사용자 세션이 아닌, 소유한 테스트/demo 환경의 가상 데이터로 촬영했습니다.

recent-qa

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • 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 commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Thanks for this, @od-studio-webagency. Your commit is carried over onto current main in #829, with your authorship and a changelog credit, so I am closing this one in its favour.

Two things changed on top of it there:

  • 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.

#640 stays open until #829 merges.

@devswha devswha closed this Oct 11, 2026
devswha added a commit that referenced this pull request Oct 11, 2026
## 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 #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.** #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
#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.

---------

Co-authored-by: studiood <253281802+od-studio-webagency@users.noreply.github.com>
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