Skip to content

Fold a project from its row the way a checkout row folds - #221

Merged
yansfil merged 2 commits into
mainfrom
feat/project-row-fold
Sep 28, 2026
Merged

yansfil merged 2 commits into
mainfrom
feat/project-row-fold

Conversation

@yansfil

@yansfil yansfil commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Summary

A project row in the Projects sidebar now follows the checkout row rule.
Clicking its body opens the project's Overview and unfolds its checkouts; clicking it again while that Overview is open and the project is unfolded folds the project, and the Overview stays.
The chevron still folds and unfolds alone, without navigating. The Overview child row, checkout rows and the plain-folder row are unchanged.
This supersedes D-03 of agents/prd/sidebar-row-click-overview-row/prd.md ("row opens, chevron toggles") by operator decision; the PRD is left as written and the current docs are updated.

Before the click: a Workspace in front, repo folded.
Workspace in front, project folded

First click on repo: its Overview opens and the project unfolds.
Row click opens the Overview and unfolds

Second click: the project folds; the Overview stays in front.
Second click folds, Overview stays

Review

  • Judge: in the third capture no sidebar row carries the selection fill, because folding hides the Overview child that owns it (unchanged rule: only the Overview child is selected, never the project row).
  • Files to watch: web/src/actions.ts - openProject sets the web-only Overview screen and sends at most one core event (ui_state_update with collapsed_workspace_ids), only when the fold changes; the Overview is not a core event, so there is no focus_checkout-style event to carry the fold.
  • Files to watch: web/src/projects.ts - projectRowExpansion reuses checkoutRowExpansion with "this project's Overview is open" as the selected input; a selected SSH device (no folds) only opens the Overview.

Evidence

  • Confirmed: scripts/verify-web.sh passes (typecheck, lint, 441 unit tests, builds), including a new projectRowExpansion truth-table test.
  • Confirmed: e2e/overview.spec.ts and e2e/projects-sidebar.spec.ts pass against a fresh hided debug build and an isolated Herdr; they now assert that the row opens the Overview and unfolds with exactly one ui_state_update and no focus_checkout, that a second click folds with the Overview still shown, and that a third unfolds. e2e/checkout-pr.spec.ts and e2e/sidebar-menus.spec.ts, which also locate project rows, pass.
  • Confirmed: the captures above come from the web shell served by hided on an isolated Herdr server, driven through the same three clicks.
  • Not confirmed: the packaged Electron app was not launched; the change is web shell only and the desktop host serves the same bundle. Remote SSH device behavior (open without folding) is covered by the unit test only.

AI tooling: mostly AI tools; the behavior was checked by hand against the captures and the e2e wire counts.

@yansfil
yansfil merged commit c18c3c1 into main Sep 28, 2026
11 of 13 checks passed
@yansfil
yansfil deleted the feat/project-row-fold branch September 28, 2026 04:29
yansfil added a commit that referenced this pull request Sep 28, 2026
Brings in Agent tab groups (#217), the sidebar shell (#219), the
sidebar row menus (#220) and the project row fold (#221) alongside the
issue-first Overview.

- The every-project screen keeps main's title, Overview (sidebar-shell
  D-02), on the issue-first board; its docs and Screen / Main follow.
- actions.ts keeps main's row-menu and project-fold actions and the
  issue-linked createWorktree; WorkspaceDialogs keeps the issue dialogs
  and main's Remove project `listed` flag; keyboard.ts keeps the renamed
  recent entries and main's agentListOrder.
- design/hide-screens.pen is rewritten from the merged
  scripts/pen-screens.mjs with scripts/gen-screens.mjs rather than
  merged by hand.
yansfil added a commit that referenced this pull request Oct 29, 2026
…d stages (#1837)

Closes with-hide/hide-private#252
Related: with-hide/hide-private#221, with-hide/hide-private#171,
with-hide/hide-private#135, with-hide/hide-private#207,
with-hide/hide-private#216

## Summary

On Windows a right-click on a terminal link also opened the link, beside
the menu: a folder link revealed its folder and an HTML link loaded its
page again.
xterm opens a link on the release of any mouse button, and on Windows
the right-click menu appears after that release; now a right-click opens
only the menu, and the primary and middle buttons open links as before.
Separately, the first page a test opens on Windows sometimes stays
`loading` for the whole 10 s `--wait`, and nothing said where it
stopped.
Each load the core asks for now logs when its route came, when it
committed and when its own load call settled, against that load alone,
with the display, the native page id and the time; the browser spec
records the native page's own state when that first wait gives up.

스크린샷 없음: the shell change is which mouse button opens a terminal link;
nothing drawn changes.

## Review

- **조심해서 볼 파일**: `web/src/terminalLinkProvider.ts` - both link paths
(detected and OSC 8) go through one `opens(event)` check, which refuses
only the right button.
- **조심해서 볼 파일**: `desktop/src/main/browser.ts` - each `load()` holds its
own `CoreLoad`; a commit counts only after its own `loadURL`, its stop
is that call's promise, a newer load or failed route ends it; three
lines per core-asked load.

### Per issue

- #252 terminal-links "terminal HTML opens a rendered page": fixed at
the cause above; the spec now also asserts one `browser_open`, which a
right-click activation adds on Windows every run.
- #221, #171, #135, #207 (browser.spec first `--wait` open stays
`loading`, status 2): cause not proven yet. Host log shows
`view_created`/`page_visible` then nothing for 10 s, no route or load
failure; core log has no stale-report refusal, so the core got `loading`
and never `loaded`. Only the first page of a fresh profile fails. This
PR adds the evidence that names the stage.
- Their older signature, `shellPage` 30 s in `fixture.ts`, is the
desktop startup flake handled by the flaky2-win-desktop change.
- #216 reveal-external (rail tool click left unpressed): last seen
2026-10-20, before the rail was rebuilt (#1552); not touched here.

## Evidence

- **확인한 것**: web unit test that a right-click's release opens no link
fails without the fix and passes with it.
- **확인한 것**: macOS desktop e2e 1/2 failed once fetching the pinned Herdr
(`curl: Failed to connect to github.com`); its rerun passed.
- **확인한 것**: desktop unit tests: a reopen waiting for its route while
the earlier load commits and stops, two checkouts' same id and load told
apart by `contents`, a failed route then a page navigation; all three
fail on the previous code.
- **확인한 것**: web unit tests: right button opens nothing, primary and
middle open; ⌘-click on macOS, Ctrl-click on Windows/Linux still open
externally.
- **확인한 것**: Windows desktop e2e 19/19, no flaky test, in three runs: PR
verify 40852660304 and nightly `lane=windows` 40857562866 on e09dc15,
PR verify 40873166675 on 1b89a27 (all jobs green).
- **확인하지 못한 것**: the stage of the stuck first load: neither Windows run
reproduced it; the issues say how to read the next failure.
- **확인하지 못한 것**: nightly 40857562866 failed `agent journey fake model
(windows)` on `guidance_memory`; untouched by this diff, passed on
main's 10-28 nightly, not checked on current main.
- **확인하지 못한 것**: the full web unit suite locally (67 failures at load
average ~300 on this Mac, not read); CI's web unit lane passed on
1b89a27.

<details><summary>Verification record</summary>

- Head 1b89a27; CI tested merge bf853d1 (1b89a27 into main
1849300), PR verify 40873166675: success, every job.
- Earlier head e09dc15: PR verify 40852660304 success after one rerun
of the macOS desktop job (github.com unreachable fetching Herdr);
nightly `lane=windows` 40857562866: desktop and web e2e green, `agent
journey fake model (windows)` failed on `guidance_memory`, outside this
diff.
- Local (this Mac, load 100-300): web and desktop typecheck and lint
pass; desktop unit 297 passed; `terminalLinkProvider.test.ts` 43 passed;
`browser.test.ts` 26 passed.
- Not run: desktop e2e locally (no build on this disk), Windows locally
(no Windows host).
- Limit: the stuck first page load did not recur in three Windows runs,
so its stage is still unproven; #221, #171, #135 and #207 stay open with
the reading guide.

</details>
yansfil added a commit that referenced this pull request Oct 30, 2026
…rt (#1855)

Closes with-hide/hide-private#324
Related: with-hide/hide-private#328, with-hide/hide-private#326, #1841

## Summary

Windows 테스트 도우미 `runBounded`가 자식 프로세스 트리 일부를 놓치던 문제(#324)를 고칩니다.
이제 자식을 시작하는 순간 Windows Job object에 넣고(`hide-processes run`), 끝날 때 job이 빌
때까지 확인합니다.
나중에 프로세스 목록을 다시 읽어 트리를 찾던 방식은 없어졌습니다.
#328(창이 셸을 30초 못 그림)은 다음에 실패할 때 어느 단계가 멈췄는지 남도록, 실패 때만 기록을 남깁니다.
#1841의 Windows 7.4초는 종료 결함이 아니었습니다(Evidence).

스크린샷 없음: 테스트 도우미와 fixture만 바뀌고 제품 화면은 바뀌지 않습니다.

## Review

- **판단해 주세요**: 첫 컴파일(`hide-processes` 자신)은 아직 job을 만들 도구가 없어, 프로세스 하나짜리
단계로 나눴습니다: `clang -c`, 그리고 clang이 `-###`로 알려 준 lld-link 한 번.
- 비교한 대안: 지금처럼 `clang -o` 한 번은 clang이 link.exe와 vctip.exe를 자식으로 띄워 #324의
경우 1이 그대로 남습니다.
- launcher 바이너리를 커밋하면 저장소에 빌드 산출물이, Rust owner로 만들면 web unit suite에
cargo 빌드가, PowerShell `Add-Type` job은 csc.exe 자식과 수십 초 cold start가 붙습니다.
- launcher는 이미 소스 hash당 한 번만 빌드되고 `runBounded`는 그것만 씁니다. 남는 것은 그 한 번의
빌드라 단계 분리를 골랐고, Windows unit suite가 세 단계가 각각 프로세스 1개임을 job으로 셉니다.
- **조심해서 볼 파일**: `web/e2e/shims/hide-processes.c` - 프로그램을 job 안에서 만드는
것(`PROC_THREAD_ATTRIBUTE_JOB_LIST`), 받은 인자를 그대로 넘기는 `after_argument`, 상속
handle을 stdout/stderr/NUL로 제한한 것, job을 다시 끝내며 비었는지 세는 루프.
- 시작 전 준비가 실패하면 `unstarted`, 시작 뒤 wait나 exit status 읽기가 실패하면 job을 끝내고 빈
것을 확인한 뒤 `failed`, job을 끝내거나 셀 수 없으면 `unconfirmed`로 Win32 오류와 함께 보고합니다.
- 첫 컴파일은 clang이 cc1을 따로 띄우게 하는 `CC_PRINT_PROC_STAT`, `CLANG_SPAWN_CC1`,
`CCC_OVERRIDE_OPTIONS`를 뺀 환경에서, 기본 config 파일을 읽지
않고(`--no-default-config`, 컴파일과 `-###` 계획 둘 다) 돕니다. Windows 테스트가 변수 둘과
`-fproc-stat-report`를 켠 `clang.cfg`(clang이 먼저 찾는 폴더)를 둔 채 세 단계가 각각 프로세스
1개인지 세고, 같은 config로 `--no-default-config` 없이 컴파일하면 프로세스가 2개 이상인 것도
확인합니다.
- **조심해서 볼 파일**: `web/e2e/bounded-child.ts` - Windows의 끝내기가 launcher 보고를
기다리는 비동기로 바뀜(30초 상한). worker exit 때는 launcher 입력을 닫아 job을 끝내게 하고,
launcher가 죽으면 `KILL_ON_JOB_CLOSE`가 끝냅니다.
- **조심해서 볼 파일**: `desktop/e2e/fixture.ts` - 셸 대기가 실패할 때만 host 로그 끝 40줄,
창 상태, 페이지의 요청과 status를 `[failure dump] shell wait`로 남깁니다. 요청 실패 이유는 남기지
않습니다. 각 비동기 읽기는 5초 상한(host 로그 읽기는 동기).

## Evidence

- **확인한 것**: Windows CI(run 41000366235, head 84ca48b)에서
`bounded-child.unit.ts` 9개 통과: 부모가 먼저 끝난 손자(job이 3개를 셈), 바로 끝나는
child(1개), 없는 프로그램, 첫 컴파일 단계 hang, 첫 컴파일 세 단계가 각각
1개(`CC_PRINT_PROC_STAT`, `CCC_OVERRIDE_OPTIONS`, `-fproc-stat-report`를 켠
`clang.cfg`를 둔 채). 같은 config로 `--no-default-config` 없이 컴파일하면 프로세스가 2개
이상이어서, config가 실제로 읽히는 조건에서 막힌 것입니다.
- **확인한 것**: macOS clang 16 `-###`: 같은 `clang.cfg`에서
`--no-default-config`가 없으면 `Configuration file`만 찍히고 `(in-process)`가 없고,
있으면 `(in-process)`.
- **확인한 것**: run 41000366235의 모든 lane 통과(Windows web e2e, Windows
desktop, Linux, macOS). 그 전 run 40994151251 attempt 1에서는 Windows
desktop이 #221(첫 `hide browser open --wait`가 `loading`) 증상으로 두 번 실패했고,
attempt 2에서 19개 통과. 이 실패는 #221에 기록됐고 이 PR이 건드리지 않는 경로입니다.
- **확인한 것**: 심은 결함: macOS에서 process group 대신 첫 프로세스만 끝내게 하면 손자 테스트가
`expected true to be false`로 실패합니다.
- **확인한 것**: 7.4초(#1841 run 40918681007)는 dial 전, job의 첫 ssh.exe 시작(`ssh
-V`, `ssh -G`)에 든 6161 ms입니다. 종료는 ssh kill `after_ms 3`, 0.5초 미만.
- **확인한 것**: 그 뒤 main과 PR의 Windows run 40개에서 같은 테스트 1.1-2.7초. 5초 attempt
대기를 쓰지 않아 코드는 바꾸지 않았습니다.
- **확인한 것**: #326: nightly Windows package lane(설치 직후 release 빌드)의 첫
`hide connect` 2.7초, 가장 긴 단계 0.2초(runs 40961007929, 40773892418). 24초는
debug 빌드였습니다. 이슈에 남기고 열어 둡니다.
- **확인한 것**: #328: #1833 merge 뒤 Windows desktop job 59개에서 0건. 이전 실패 두
건의 hided 로그는 daemon 정상 시작, 어떤 view도 크기를 보내지 않음. 진단만 넣고 열어 둡니다.
- **확인하지 못한 것**: 실제 Windows PC의 첫 시작 측정(#326 완료 조건), 이 환경에 Windows 기기가
없습니다.
- **확인하지 못한 것**: Windows에서의 심은 결함 실행(job 밖 생성, Win32 API 실패 주입; clang
설정은 위 대조로만)과, #328 진단이 실제 실패에서 찍히는 것(그동안 재현되지 않음).

<details><summary>Verification record</summary>

- base: a891332, head: 84ca48b
- macOS: `vitest run e2e/bounded-child.unit.ts
e2e/platform-program.unit.ts` 9 passed 1 skipped (Windows-only);
web/desktop typecheck, lint 통과; `hide-processes.c` zig
cc(x86_64-windows-gnu) `-Wall -Wextra` 경고 없음(pragma 제외)
- CI run 40990677533(head 29eaaa4): 모든 lane 통과, flaky 0
- CI run 40994151251(head 1e7bfc3, 리뷰 반영): attempt 1에서 Windows
desktop만 #221로 실패, attempt 2 통과, verify pass
- CI run 41000366235(head 84ca48b, 기본 clang config 차단): verify pass, 첫
attempt 모든 lane 통과

</details>
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