Skip to content

fix(herdr): populate workspace path and show pane count in detail#37

Merged
lmilojevicc merged 1 commit into
mainfrom
fix/herdr-metadata-35
Jul 13, 2026
Merged

fix(herdr): populate workspace path and show pane count in detail#37
lmilojevicc merged 1 commit into
mainfrom
fix/herdr-metadata-35

Conversation

@lmilojevicc

Copy link
Copy Markdown
Owner

Summary

Under herdr the workspace detail pane showed an empty path and always-unknown activity/created. This derives each workspace's path from the focused pane's cwd, adds a panes (splits) row, and makes the activity/created rows data-driven so they hide when no timestamp exists. tmux behavior is unchanged.

Closes #35

Changes

  • Path (was empty): herdrBackend.ListSessions derives each workspace's path from the focused pane's foreground_cwd/cwd via a new best-effort herdr pane list call (mirrors the existing tab-list pattern), falling back to the first pane, then ws.Cwd. workspace list exposes no cwd, so panes are the only source.
  • Splits (new): new Item.Panes field, populated from the workspace pane_count that workspace list already returns; the detail pane shows it as a panes row when > 0.
  • Timestamps (were always unknown): herdr exposes none, so detailLines now renders activity/created only 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.
  • workspaceInfo parses pane_count; new herdrPanes / herdrWorkspacePaths helpers (single-pass: focused pane cwd wins, else first-seen).

Validation

  • mise run verify — fmt:check / lint (0 issues) / vet / build clean; all tests pass
  • Tests added/updated:
    • TestHerdrBackendListSessions — path from focused pane foreground_cwd + Panes from pane_count
    • TestHerdrBackendListSessionsFocusedPath — focused pane wins even when not first; foreground_cwd preferred over cwd
    • TestHerdrBackendListSessionsNoFocusedPaneUsesFirstPaneCwd — first-seen fallback, disambiguated from ws.Cwd
    • TestHerdrBackendListSessionsPaneListErrorFallsBackToWorkspaceCwd — best-effort error-swallow contract
    • TestSessionDetailShowsPanesAndTimestampsWhenSet — positive branch guard
    • TestSessionDetailHidesPanesAndTimestampsWhenZero — negative branch guard
  • Docs updated (README/AGENTS.md) if needed — none needed (internal display metadata only)

Notes

  • The one failing test locally, TestApplyManifestFallbackClaudeBlockedSurvivesIdleRule, is pre-existing and unrelated — it fails because agents_capture_test.go reads the real user manifest cache (a newer upstream claude.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.Panes is intentionally not exposed in --json output (out of scope for this TUI-focused issue).

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
@lmilojevicc
lmilojevicc merged commit 0cdafe6 into main Jul 13, 2026
2 checks passed
@lmilojevicc
lmilojevicc deleted the fix/herdr-metadata-35 branch July 13, 2026 23:18
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.

herdr: detail pane path empty; activity/created always unknown

1 participant