Skip to content

FEAT: header navigation and animated Monitor detail activity - #42

Merged
merefield merged 10 commits into
mainfrom
feat/header-links-detail-activity
Sep 8, 2026
Merged

FEAT: header navigation and animated Monitor detail activity#42
merefield merged 10 commits into
mainfrom
feat/header-links-detail-activity

Conversation

@merefield

@merefield merefield commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Why

Make the dashboard easier to navigate and give full Monitor detail a clearer sense of activity after sending a reply or approval, without expanding the compact session rows.

Changes

  • Clicking the visible Codexometer title/logo returns to Quota → Bars, updating the remembered Quota view. The title has no external hyperlink or terminal hyperlink decoration.
  • The version number is a terminal-native OSC 8 hyperlink to its release highlights, underlined on hover. Use the terminal's hyperlink gesture (usually Ctrl-click). Development builds link to their base release; unknown versions fall back to the releases list. No OS browser-launch commands are executed, avoiding remote/WSL launcher errors.
  • Full detail animates successful Text sent ... / Decision sent ... notices with a themed dot wave, using the existing one-second UI tick.
  • New context/attention changes replace the sent wording with dots alone while the session is observed working without attention flags. Completion, input/approval/check-session flags, idle/inactive sessions, paused monitoring and observation errors stop the indicator.
  • Visible compact and expanded session-context boxes also show synchronised activity dots at the bottom left, independently for each session. Short boxes prioritise readable context and approval controls. No new click targets or approval permissions.
  • Both displays require a per-session working-turn signal from the shared server or a live local writer; recent file activity alone is insufficient. Working linked agents aggregate into the root session. Activity remains best-effort—not proof a command executed.
  • Sent wording remains readable for at least three seconds through fast activity updates. When animation is suppressed by pause/error/inactivity/attention, retain a plain delivery acknowledgement for the same context or remaining minimum duration. Replacement context and other sessions cannot inherit an expired acknowledgement; actionable controls remain first priority.
  • Scrolling reserves the same rows as the rendered detail controls; translated headers retain their existing appearance and clipped version labels have no ghost target.
  • README documents navigation, activity semantics and terminal hyperlink requirements.
  • Each row independently cycles back and forth through four states: graph-only → split detail/graph → full-width detail → full-screen detail → full-width → split → graph-only. Esc/close from full detail returns to the same row and subsequent cycling continues downward. Global h/Show/Hide resets every row to split or graph-only, clears row overrides and closes full detail. Only the global default persists across launches. Editor typing/Esc behavior is unchanged; info buttons and non-editing Enter follow the row cycle. Approval controls remain exclusive to the selected target even with multiple full-width rows.
  • Cleanup: reject non-header mouse events before rendering; resolve each click target once; use an explicit shared detail-control layout for rendering and scroll row counts. Removed redundant activity guards and the version-link multi-line wrapper. Prerelease tags and original URL casing are preserved while known development suffixes are removed.

Validation

  • go test -race ./...
  • go vet ./...
  • Responsive header click tests across narrow/wide terminals and all fourteen languages.
  • Sent-result lifecycle, activity stop conditions and final-line scrolling regression tests.
  • Existing translated layout, approval/button hitbox and English presentation tests.
  • Final hyperlink refinements: go test ./internal/ui ./internal/i18n; release-URL, hover-geometry and title-without-hyperlink regressions. The English snapshot ignores only the new version-link metadata, retaining checks of text, colour and layout.
  • Local rebuild for review; no release or version bump in this PR.
  • Regression tests cover zero-allocation non-header hit checks, layout/render row agreement, prerelease URLs and dirty development identities.
  • Main-screen dot placement and session-specific stop conditions run across all fourteen languages; reader/UI regressions cover idle-versus-working state, linked-agent aggregation, and propagation through start, sync and resume. Full race suite and vet passed after these changes.
  • Back-and-forth navigation is tested for repeated keyboard cycles, Esc return, mouse controls and all fourteen languages. Applied Copilot's optional snapshot-test cleanup: compile the hyperlink regex once and avoid shadowing the view identifier.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Successful “sent” acknowledgements can disappear entirely when activity is suppressed (paused/error/attention), losing confirmation feedback for the user.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds richer header navigation and an animated “activity” indicator for full Monitor detail, including terminal-native OSC 8 release hyperlinks, while tightening layout/scroll geometry consistency.

Changes:

  • Make the header title/logo clickable to jump back to Quota → Bars; add an OSC 8 hyperlink on the version label (with hover underline styling).
  • Introduce a “dot wave” activity indicator for successful “Text sent …” / “Decision sent …” states in full Monitor detail, plus shared layout logic for detail controls vs. scroll row counts.
  • Expand tests and docs to cover header hit targets, hyperlink rendering, activity lifecycle, and scrolling behavior.
File summaries
File Description
README.md Documents header navigation, OSC 8 hyperlink behavior, and Monitor detail activity semantics.
internal/ui/view.go Post-processes rendered output to wrap the header version label with a terminal hyperlink.
internal/ui/model.go Adds header mouse handling (home/version hover) and tracks monitorDetailSent + hover state.
internal/ui/header_actions.go Implements header hit testing and version hyperlink URL generation/formatting.
internal/ui/header_actions_test.go Adds coverage for click targets, hyperlink geometry, and release URL mapping rules.
internal/ui/monitor_detail_activity.go Adds sent-state tracking, wave generation, and shared “detail control layout” logic.
internal/ui/monitor_detail_activity_test.go Tests lifecycle/stop conditions, scroll reachability, and layout-vs-render row agreement.
internal/ui/monitor_prompt.go Integrates sent-state recording and routes prompt notice display through activity rules.
internal/ui/monitor_context.go Uses shared detail-control layout for rendering and scrolling calculations.
internal/ui/monitor_approval.go Clears sent-state when starting an approval action.
internal/ui/localisation_test.go Registers new localisation-related UI tests (header click surfaces, detail activity).
internal/ui/english_snapshot_test.go Preserves snapshot stability by stripping only the new hyperlink metadata.
Review details
  • Files reviewed: 12/12 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread internal/ui/monitor_detail_activity.go Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are cohesive and well-covered by targeted UI and live-usage tests, with only minor optional test refactoring feedback outstanding.

Review details

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

internal/ui/english_snapshot_test.go:27

  • TestEnglishPresentationSnapshot recompiles a regexp inside the innermost loop and also shadows the view loop variable with a view := ... string, making the test harder to read and doing unnecessary work. Precompile the hyperlink-stripping regexp once (the appVersion is constant in this test) and use a different variable name for the rendered string.
  • Files reviewed: 16/16 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@merefield

Copy link
Copy Markdown
Owner Author

Addressed the optional snapshot-test feedback in 3004755: the hyperlink-stripping regexp is compiled once, and the rendered string no longer shadows the view loop variable. Also added the requested back-and-forth context navigation in ad0c3dd, with repeated keyboard/Esc cycles, mouse navigation and all-locale regression coverage. The final go test -race ./... run and go vet ./... passed. Local build: 0.14.0-8-gad0c3dd. The latest Copilot review generated no new review threads.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Switching away from Monitor clears the expanded/detail target but not the new per-row mode map, which can leave rows visually expanded while the target becomes empty and per-target controls stop working until re-cycled.

Review details

Suppressed comments (1)

internal/ui/model.go:1070

  • When leaving the Monitor view, pressViewTab clears monitorContextDetail/monitorContextExpanded but leaves monitorContextRows intact. With the new per-row modes, that can leave rows rendered as split/wide (via rowContextMode reading monitorContextRows) while monitorContextTarget() becomes empty, which in turn breaks contextDetailSession() and suppresses per-target controls (e.g., inline approval buttons) until the user re-cycles a row.

To keep state consistent, clear monitorContextRows alongside the other Monitor context state when switching away from Monitor (or alternatively restore a valid monitorContextExpanded target on return).

	if view != viewMonitor {
		m.monitorDetailSent = detailSentState{}
		m.monitorPrompt = monitorPromptState{}
		m.monitorContextDetail = ""
		m.monitorContextExpanded = ""
		m.monitorContextHover = ""
	}
  • Files reviewed: 19/19 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@merefield
merefield merged commit fef92e5 into main Sep 8, 2026
4 checks passed
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.

2 participants