Skip to content

Join wrapped terminal paths and open clicked directories in the explorer or Finder - #11

Merged
yansfil merged 3 commits into
mainfrom
fix/terminal-path-links
Sep 6, 2026
Merged

yansfil merged 3 commits into
mainfrom
fix/terminal-path-links

Conversation

@yansfil

@yansfil yansfil commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

What changed, in one paragraph a new contributor can follow

Clicking a path in a terminal pane now works for two shapes it did not: a long path that a transcript wraps across rows, and a path that names a directory. Codex breaks a long command path after the last / that fits and continues it on the next rows behind a │ gutter, so clicking /Users in Ran tail -45 /Users/hoyeonlee/projects/ offered /Users/hoyeonlee/projects/ alone. The row-join rule in the vendored SwiftTerm needed the upper row to reach 80% of the width and read the gutter as the row's first character; it now joins rows when the upper row is full, or when it ends in / and the lower row's first path unit could not have fit in the room the upper row left, and it skips box-drawing gutter cells. The 80% rule also joined two long paths printed one under the other in a listing; the separator ending keeps them apart. A directory link was refused with "is a folder"; it now opens in the explorer when it is inside the explorer's root (the panel switches to Explorer, the directory and its ancestors expand, and it becomes the selected row) and in Finder otherwise.

Review boundary

  • Runtime mutex: nothing. The join runs in the terminal view's link lookup; the directory reveal is one ui_state dispatch.
  • Snapshot wire: no field added or moved. The reveal writes expanded_paths and selected_path, which already exist and already re-send rest on change.
  • Ownership: core-owned values only (panel visibility, panel section, expanded paths, selected path). Nothing waits for Herdr.
  • Herdr contract: no Herdr method is called.
  • Failure path: a directory Finder cannot open surfaces as an interaction notice with Finder's reason, and terminal.link.failed is traced with finder_open; a link that resolves to nothing stays silent on screen and is traced with the reason, as before.

Evidence

  • Verified by: the Codex fixture in TerminalImplicitLinkSpanTests is the rendered output read from a live 50-column Codex pane; on the previous Terminal.swift it reproduces the report exactly (/Users/hoyeonlee/projects/), and passes after. A hard wrap at the right edge and an adjacent-paths listing are asserted alongside. Directory routing, the explorer-or-Finder decision (inside, outside, root itself, no root) and a symlinked explorer root are asserted in TerminalLinkResolverTests. swift test --package-path macos: 228 tests pass on the rebased tree.
  • Not verified (and why): no click in the running app. The operator's app is the installed bundle with live agent sessions, and relaunching it was not worth the interruption; the first click after the next dev build is the check. Claude Code's wrap shape was not captured from a live pane; the rule is shape-based (full row, or a / ending the lower unit could not follow), so it covers a hard wrap and a separator wrap, and a shape outside those needs a fixture.

Screenshots

N/A - no visual surface changed; the explorer reveal reuses the existing selection and expansion behavior.

AI tooling

The code and tests were written in an agent session. Checked by hand: the Codex row shape was read from a live pane rather than assumed, the new tests were run against the previous vendored Terminal.swift to confirm they fail there, and the full macOS suite was run after rebasing onto the current main.

…t and in Finder otherwise

A terminal link that named a directory was refused with "is a folder.
Terminal links open files", and the click did nothing. Agent transcripts
print directories as often as files: run directories, evidence folders,
worktree roots.

The resolver now routes a directory as its own case. One inside the
explorer's root is revealed there: the panel switches to Explorer, the
directory and its ancestors are added to the expanded paths, and the
directory becomes the selected path, which the outline already follows.
One outside that tree opens in Finder, the only view of it Hide has, with
a failure reported the way a browser failure is. Containment is judged
with symlinks resolved and the reveal is spelled under the explorer root
as given, because the outline names its rows by appending to that root.
Codex wraps a long path in a command row after the last `/` that fits and
continues it on the next rows behind a `│` gutter, so clicking `/Users` in
`Ran tail -45 /Users/hoyeonlee/projects/` offered `/Users/hoyeonlee/projects/`
alone. The row-join rule required the upper row to reach 80% of the width,
which that first row does not, and it read the gutter as the row's first
character, which is not a path character.

Two rows are now one wrapped line when the upper row is full, or when it
ends in `/` and the lower row's first unit (through its first `/`) is wider
than the room the upper row left. Leading box-drawing cells are skipped as
gutter. The separator ending is what tells a wrap from a listing: two long
paths printed one under the other leave the same room and the same unit,
and the 80% rule joined them into one unopenable link.
The workstation identity check refused the fixtures because they quoted
the operator's home directory as read from the live pane. The prefix is
replaced with one of the same width, so every row keeps the column the
join rule is asserted against.
@yansfil
yansfil merged commit 5b0232e into main Sep 6, 2026
4 checks passed
@yansfil
yansfil deleted the fix/terminal-path-links branch September 6, 2026 04:54
yansfil added a commit that referenced this pull request Oct 5, 2026
…el (#443)

Closes #354

## Summary

큰 이슈를 하위 이슈로 나눠 진행할 때, 그 진행을 hide 보드에서도 GitHub와 같은 관계로 보여줍니다.
하위 이슈가 있는 이슈 카드에 GitHub의 `subIssuesSummary`를 그대로 `하위 3/5`로 보여주고, 이슈 패널에
하위 이슈 목록(상태, 그것을 닫는 PR 칩)을 보여줍니다.
PR 템플릿은 이슈 번호를 `Closes #N` 줄에, `Related:` 줄에는 PRD 경로와 선행/의존 PR만 적도록
바꿨습니다.

![In progress 카드의 하위 1/2 줄과 패널의 하위 이슈 목록 (#4는 PR #11이
닫음)](https://github.com/yansfil/pr-assets/blob/main/hide/feat-sub-issue-progress/779f9eb/sub-issues-panel.png?raw=true)

가운데 카드의 `Sub-issues 1/2` 줄과 오른쪽 패널의 하위 이슈 목록을 보면 됩니다. 한국어 UI에서는 `하위
1/2`로 읽힙니다.

## Review

- **판단해 주세요**: 카드의 진행률 줄을 제목 아래(잠금 줄 자리)에 한 줄로 두었습니다. 하위 이슈가 있는 카드만 한 줄
높아집니다.
- **조심해서 볼 파일**: `herdr-core/src/github.rs` - 기존 `blockedBy` GraphQL 요청
한 번에 필드만 더했고, 새 요청이나 polling은 없습니다. 읽기 실패 시 이전 값을
유지합니다(`runtime/projects.rs`).
- **조심해서 볼 파일**: `herdr-core/src/tasks.rs`, `web/src/snapshot.ts` -
snapshot wire에 `sub_issues`를 더했습니다. 값이 없으면 null이라 이전 읽기 쪽은 그대로 읽습니다.
- **비용 검토**: 이슈당 하위 이슈 목록은 GitHub의 이슈당 한도인 100개까지만 읽습니다. 락 안의 일은 늘지 않고,
직렬화는 기존 경로 그대로입니다.
- **질문**: 한 하위 이슈를 닫는 PR이 여럿이면(닫힌 채 버려진 PR 등) 닫히지 않은 첫 PR의 칩 하나만 보여줍니다.
이 기본값으로 충분한가요?

## Evidence

- **확인한 것**: `verify-cargo.sh test-scoped -p herdr-core --lib`의
github/tasks/runtime issues·pull_requests 94개 통과, `clippy --workspace
--all-targets -D warnings`와 `fmt` 통과.
- **확인한 것**: 웹 `typecheck`, `lint`, 단위 테스트 989개 통과.
- **확인한 것**: 격리된 fixture(가짜 `gh`)에서 Overview e2e 1건 통과. 카드 `Sub-issues
1/2`, 하위 이슈 상태, PR #11 칩, 닫힌 하위 이슈의 칩 없음, 하위 이슈가 없는 카드에 줄 없음을 단언합니다.
- **확인하지 못한 것**: 실제 GitHub 저장소에 대한 라이브 확인. 요청 모양은 이 저장소 #354에 직접 보낸
GraphQL(`subIssuesSummary`, `subIssues`)이 응답하는 것으로만 확인했습니다(하위 이슈 0개).
운영자 앱은 건드리지 않았습니다.
- **확인하지 못한 것**: 전체 CI 레인(나머지 e2e shard, desktop). 이 PR의 CI에서 확인합니다.
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