Skip to content

Draw a checkout's delegated-only tab instead of the empty Agent area - #185

Merged
yansfil merged 3 commits into
mainfrom
fix/delegated-tab-canvas
Sep 27, 2026
Merged

yansfil merged 3 commits into
mainfrom
fix/delegated-tab-canvas

Conversation

@yansfil

@yansfil yansfil commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Related: agents/prd/hide-orchestrator/prd.md B1·B4·D-40

Summary

사이드바에서 워크트리의 에이전트를 클릭하면 캔버스 대신 "No agent tab is open in this Workspace."가 나오는 버그를 고칩니다.
Workspace 화면은 Agent 영역이 비었는지를 탭 스트립으로 판단했는데, 스트립은 위임된 자식만 담은 탭을 의도적으로 뺍니다(B1).
다른 체크아웃에서 dispatch된 Implementor 하나만 있는 워크트리는 탭이 그 위임 탭 하나라 스트립이 비고, 코어가 그 탭을 보이는 탭으로 정해 놓았어도 빈 상태가 그려졌습니다.
이제 빈 상태는 체크아웃에 탭이 하나도 없을 때만 나오고, 스트립은 여전히 위임 탭을 숨깁니다.

위임 탭만 있는 체크아웃을 열면 스트립은 비어 있고 자식 pane이 그려진다
사이드바의 자식 행을 클릭하면 그 pane에 키보드가 들어간다

Review

  • 판단해 주세요: 위임 탭이 보이는 동안 스트립에 활성 탭이 없는 상태를 그대로 둔 것. B1의 "스트립에 나타나지 않는다"를 따랐고, 뒤로 가기는 pane 헤더의 Return이 맡습니다.
  • 조심해서 볼 파일: web/src/WorkspaceScreen.tsx - 빈 상태 조건 한 줄이 바뀝니다. 코어·wire·Herdr 호출은 건드리지 않습니다.

Evidence

  • 확인한 것: 운영자 앱의 라이브 스냅샷에서 두 워크트리(prd/electron-app-swift-removal, feat/design-review-workflow)가 active_tab_id는 위임 탭을 가리키고 strip은 빈 상태임을 읽었습니다.
  • 확인한 것: 새 Playwright 스펙 web/e2e/delegated-checkout.spec.ts가 격리된 Herdr 0.9.1 + hided에서 수정 전 캔버스 단언에서 실패하고 수정 후 통과합니다(체크아웃 클릭, 사이드바 자식 행 클릭 둘 다).
  • 확인한 것: pnpm --dir web typecheck && lint && test(44 파일 390 테스트), node scripts/check-design-contract.mjs 통과.
  • 확인하지 못한 것: 전체 web e2e 68개는 로컬에서 실행 중이며 결과는 이 PR에 댓글로 남깁니다. 설치된 운영자 앱은 교체하지 않았으므로 실제 앱에서의 재확인은 설치 후에 가능합니다.

AI tooling: 대부분 AI 도구. 라이브 스냅샷의 탭·스트립 값과 수정 전후 e2e 결과를 손으로 대조했습니다.

The Swift shell is being removed; the pipeline's sealed suite now runs the cargo
lanes and a web/desktop entrypoint (scripts/verify-web.sh) the removal PR adds.
The Workspace screen decided the Agent area was empty from the tab strip,
which leaves out a tab holding nothing but delegated children. A worktree
whose only agent is an Implementor dispatched from another checkout then
showed "No agent tab is open" whenever its checkout or agent row was
chosen, although the core had made that tab visible. The empty state now
means the checkout has no tab at all; the strip still hides the delegated
tab (PRD hide-orchestrator B1, B4).

A Playwright spec covers a second checkout whose single pane is a declared
child: opening the checkout and its sidebar row both land on the pane with
an empty strip. UI_BEHAVIOR.md states the rule.
@yansfil

yansfil commented Sep 27, 2026

Copy link
Copy Markdown
Contributor Author

Local full web e2e on the fix worktree (isolated pinned Herdr 0.9.1, one worker): 68 passed in 12.8 min, including the new delegated-checkout.spec.ts.

@yansfil
yansfil merged commit cf9189f into main Sep 27, 2026
7 checks passed
@yansfil
yansfil deleted the fix/delegated-tab-canvas branch September 27, 2026 08:29
yansfil added a commit that referenced this pull request Sep 27, 2026
Related: PRD `agents/prd/electron-app-swift-removal/prd.md` · backlog
issue #184 (features only the removed shell had) · follows #185

## Summary

- The Swift shell (`macos/`, 279 files), its C ABI, the shell pivot
spike, hided's coexistence prompt, the Swift build and verify scripts,
the Swift CI lane and 22 Swift-subject check scripts are deleted.
- The Electron app (`desktop/`) is the only shipped app: `pnpm --dir
desktop package` builds `hided`, `hide`, the hook helper, the device
helper and the pinned Herdr into `Contents/Resources`, ad-hoc signs,
zips and writes a sha256; `release.yml` publishes that archive.
- A packaged app resolves its own bundled `hide` before PATH and hands
the bundled Herdr to the daemon as `HERDR_BIN_PATH` unless the
environment already names one, so Finder launches need nothing on PATH.
- The Herdr pin moved to `contracts/herdr-bundle.json`;
`scripts/verify-web.sh` is the web and desktop verify entrypoint; tests
that scanned `macos/` now scan the web shell; the hook helper is
resolved in `Contents/Resources`, where it ships.
- Every guide, comment and identifier describes the repository without
the Swift shell; the word remains only in INSTALL.md's residual-files
line.

![The packaged hide.app opened on an isolated HOME with a bare PATH: its
bundled hide started hided against the bundled Herdr and the web shell
attached](https://github.com/yansfil/pr-assets/blob/main/hide/electron-app-swift-removal/3135944/b6-attached.png?raw=true)

![A copy of the app whose bundled hide cannot run shows the connection
failure page with
Retry](https://github.com/yansfil/pr-assets/blob/main/hide/electron-app-swift-removal/3135944/b8-cli-missing.png?raw=true)

## Review

- **판단해 주세요**: the release archive stays ad-hoc signed with no
notarization (D-08); the first launch needs the Gatekeeper context-menu
step INSTALL.md describes.
- **판단해 주세요**: neither hided nor the core starts a Herdr server (the
Swift shell did); the packaged app needs one running, reported as a
follow-up, not built.
- **판단해 주세요**: hooks the Swift app installed name a helper under its
`Contents/MacOS`; after the swap Settings shows them as missing their
helper and Install rewrites them (INSTALL.md).
- **조심해서 볼 파일**: `desktop/scripts/package.mjs` - failure path: a missing
or non-executable binary must stop the build by name and leave no app.
- **조심해서 볼 파일**: `desktop/src/main/{cli.ts,host.ts,env.ts}` - ownership:
the bundled CLI is tried after an override and the worktree build, never
remembered; `HERDR_BIN_PATH` only when absent.
- **조심해서 볼 파일**: `hide-agent-hooks/src/install.rs` - failure path:
`helper_for` now accepts only `<app>.app/Contents/Resources`; the path
written into an operator's hook file comes from here.
- **조심해서 볼 파일**: `herdr-core/src/handle.rs` - runtime mutex: the former
ffi.rs; the notifier latch is still cleared before the lock is taken.
- **조심해서 볼 파일**: `.github/workflows/release.yml`,
`scripts/verify-cargo.sh` - `build` became `release` and builds the four
shipped binaries.
- **질문**: `spikes/web-shell/` (a different frozen spike) still mentions
macos and Swift; it was left as a frozen record. Keep it, or delete it
in a follow-up?

## Evidence

- **확인한 것**: the packaged app (version 0.0.0-local) launched on an
isolated HOME with `PATH=/usr/bin:/bin:/usr/sbin:/sbin` and a private
Herdr 0.9.1 server started from the bundled binary: the host log shows
`cli.resolved source=bundled`, `herdr=bundled`, `discovery.attached`;
the window capture above shows the attached shell (B4, B6).
- **확인한 것**: a copy of the app with a non-executable
`Contents/Resources/hide` shows the connection failure page and retries
with `cli_missing` (B8); `codesign --verify --deep --strict` passes, the
zip's sha256 sidecar verifies, `Contents/Resources` holds the five
executables (B4, B5).
- **확인한 것**: packaging with a non-executable cached Herdr fails with
`cannot package hide.app: not an executable file: herdr (...)` and
leaves no app (B12).
- **확인한 것**: `verify-cargo.sh test` and `lint` (sealed suite, PASS),
`verify-web.sh` (web and desktop typecheck, lint, unit, build), the 32
python script tests, the design contract, the six scripts-lane checks
and the pin check all exit 0 on this branch.
- **확인한 것**: the B1 sweep (`rg` for
`macos/|HideTheme|herdr_core\.h|verify-swift|build_dev_app|SwiftUI|swift
test`, and `rg -i swift`) finds only INSTALL.md's line, `.swift`
file-type icon data in `web/src/fileIcons.ts` and a `/usr/bin/swift`
path assertion in a tools test.
- **확인한 것**: web Playwright e2e against a freshly built debug hided: 66
passed, 1 failed (the s7 display-limit spec, an Explorer row not
clickable within 15 s under full-suite load); that spec alone passes on
rerun, and the branch's web changes are comments and test names.
- **확인하지 못한 것**: the desktop Playwright e2e was not run locally because
it takes the operator's screen; CI's `web` lane runs it.
- **확인하지 못한 것**: no Finder `open -a` launch, no Gatekeeper first-launch
on another Mac, and no install over an existing
`/Applications/hide.app`, so the hook reinstall path after the swap is
described, not observed.
- **생성물**: `design/hide-screens.pen` and `design/hide-ui.lib.pen`
changed only in the provider-mark image URLs and three sample file or
task names, the output of `node scripts/gen-screens.mjs`.

## Breaking change

- The shipped app is the Electron `hide.app`; the Swift app is gone.
State under `~/.local/state/hide` and the hook configuration are read as
before; files only the Swift app wrote under `~/Library/Application
Support/hide/` stay on disk, and `state.json`'s pane chords are imported
once.
- Rollback is reinstalling the previous GitHub release; core state
compatibility holds only up to that release.
- Hooks installed by the Swift app point at its bundle's
`Contents/MacOS/hide-agent-hooks`; after the swap, open Settings and
install the hooks again.

**AI tooling**: mostly AI tooling; the packaged-app launch, the
cli_missing page, the packaging refusal and the B1 sweep were checked by
hand against the captures and logs.

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

- PRD: `agents/prd/electron-app-swift-removal/prd.md` (sha256
d85d8a04a4e208863493b5ecf8aba064078fccf3a83cf46dc35e7512344771d1)
- Base 452ceec → head 3135944, verified 2026-09-27T09:17:56.054Z: PASS
- Verification report:
`agents/runs/electron-app-swift-removal/verification-report.json` and
`agents/runs/electron-app-swift-removal/verification-report.md`; source
fingerprint
969ffbb03e8c67d2f001dc3de38da17911c9b266e80e783ab8c01af5fc83644e
- Suites:
  - S1: GREEN `bash scripts/verify-cargo.sh test` (exit 0)
  - S2: GREEN `bash scripts/verify-cargo.sh lint` (exit 0)
- Reviews:
- Fidelity (head 99d95ee, follow-up not needed): no Fix now; Follow-up:
the herdr-core test-coverage inventory that lived in the deleted
docs/verification-fixtures.md was not moved to a surviving guide; Note:
D-01's "12 docs / 27 scripts" counts do not map one to one onto the
diff, B1 and B10 hold.
- Code (head 99d95ee, follow-up on 3135944): Fix now:
docs/agent-hooks.md still placed the hook helper in Contents/MacOS,
fixed in 3135944 and confirmed closed by the follow-up; Note: a legacy
hook fixture string in hide-agent-hooks/src/runtime.rs keeps the old
Contents/MacOS path on purpose.
- Security (head 99d95ee, follow-up not needed): no Fix now; Follow-up:
the release archive is ad-hoc signed with no hardened runtime and no
notarization, an accepted PRD decision (D-08) worth confirming for a
public release.
- The sealed suite carries the two cargo lanes; `bash
scripts/verify-web.sh` (config key `web`) ran by hand on 99d95ee with
exit 0 (registered log).
- Evidence: 14 registered (2 screenshot, 12 log); paths are local to the
run directory
-
agents/runs/electron-app-swift-removal/evidence/b6-packaged-attached.png
  - agents/runs/electron-app-swift-removal/evidence/b6-host.log
  - agents/runs/electron-app-swift-removal/evidence/b6-status.json
  - agents/runs/electron-app-swift-removal/evidence/b8-cli-missing.png
  - agents/runs/electron-app-swift-removal/evidence/b8-host.log
  - agents/runs/electron-app-swift-removal/evidence/b12-refusal.log
  - agents/runs/electron-app-swift-removal/evidence/package.log
  - agents/runs/electron-app-swift-removal/evidence/verify-web.log
  - agents/runs/electron-app-swift-removal/evidence/cargo-test.log
  - agents/runs/electron-app-swift-removal/evidence/cargo-lint.log
  - agents/runs/electron-app-swift-removal/evidence/python-tests.log
  - agents/runs/electron-app-swift-removal/evidence/design-contract.log
  - agents/runs/electron-app-swift-removal/evidence/web-e2e.log
  - agents/runs/electron-app-swift-removal/evidence/web-e2e-s7-rerun.log
- Changed paths: 777 (see Files changed)

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