fix(herdr): populate workspace path and show pane count in detail#37
Merged
Conversation
Under herdr the workspace detail pane showed an empty `path` and always `unknown` activity/created. `herdr workspace list` exposes neither cwd nor timestamps, so derive each workspace's path from the focused pane's cwd (via `herdr pane list`, best-effort like the existing tab-list call) and surface the workspace `pane_count` as a new `panes` row. The activity/created detail rows are now data-driven: they render only when a timestamp is set, so herdr (which has none) omits them instead of printing a misleading "unknown", while tmux keeps showing real timestamps. Closes #35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Under herdr the workspace detail pane showed an empty
pathand always-unknownactivity/created. This derives each workspace's path from the focused pane's cwd, adds apanes(splits) row, and makes the activity/created rows data-driven so they hide when no timestamp exists. tmux behavior is unchanged.Closes #35
Changes
herdrBackend.ListSessionsderives each workspace's path from the focused pane'sforeground_cwd/cwdvia a new best-effortherdr pane listcall (mirrors the existing tab-list pattern), falling back to the first pane, thenws.Cwd.workspace listexposes no cwd, so panes are the only source.Item.Panesfield, populated from the workspacepane_countthatworkspace listalready returns; the detail pane shows it as apanesrow when> 0.unknown): herdr exposes none, sodetailLinesnow rendersactivity/createdonly when the time is non-zero. tmux (which always sets them) is byte-identical; herdr cleanly omits them. Future-proof — if herdr adds timestamps, the rows reappear automatically.workspaceInfoparsespane_count; newherdrPanes/herdrWorkspacePathshelpers (single-pass: focused pane cwd wins, else first-seen).Validation
mise run verify— fmt:check / lint (0 issues) / vet / build clean; all tests passTestHerdrBackendListSessions— path from focused pane foreground_cwd + Panes from pane_countTestHerdrBackendListSessionsFocusedPath— focused pane wins even when not first; foreground_cwd preferred over cwdTestHerdrBackendListSessionsNoFocusedPaneUsesFirstPaneCwd— first-seen fallback, disambiguated from ws.CwdTestHerdrBackendListSessionsPaneListErrorFallsBackToWorkspaceCwd— best-effort error-swallow contractTestSessionDetailShowsPanesAndTimestampsWhenSet— positive branch guardTestSessionDetailHidesPanesAndTimestampsWhenZero— negative branch guardNotes
TestApplyManifestFallbackClaudeBlockedSurvivesIdleRule, is pre-existing and unrelated — it fails becauseagents_capture_test.goreads the real user manifest cache (a newer upstreamclaude.toml), and passes in CI which has no cache. Tracked separately in Manifest tests read real cache; newer upstream claude.toml makes local verify red #36.Item.Panesis intentionally not exposed in--jsonoutput (out of scope for this TUI-focused issue).