Skip to content

Roomier logs, and a telescope for environments out of view - #279

Merged
coryodaniel merged 2 commits into
dashboardfrom
dashboard-polish
Nov 30, 2026
Merged

coryodaniel merged 2 commits into
dashboardfrom
dashboard-polish

Conversation

@coryodaniel

Copy link
Copy Markdown
Member

Stacked on #278.

  • Logs have room. While logs are followed, the side panel takes 55% of the window, and long lines wrap with an indent rather than being cut off.
  • 🔭 for what's out of view. An environment past the focus's edge is labeled "🔭 out of view" rather than "not loaded".

🤖 Generated with Claude Code

…th a telescope

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coryodaniel

Copy link
Copy Markdown
Member Author

@claude please review.

@claude

claude Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Claude finished @coryodaniel's task in 24s —— View job


Review of #279: roomier logs and 🔭 out of view

I read the diff and the code around it. I didn't run make check. This looks good overall, with a few small points.

What I checked and found fine

  • Wrapping: wrapLog operates on lines that logs.go:316 has already stripped of ANSI and tabs, so measuring with runewidth is safe. The wide-rune boundary is handled because a rune that doesn't fit is deferred to the next row. The cut == 0 break prevents an infinite loop.
  • Cost: logsPanel wraps from the tail and stops once it has room rows, so it doesn't re-wrap the whole buffer on each render.
  • Emoji label: the canvas code measures with runewidth (canvas.go:210, diagrams.go:410), so the wide 🔭 centers and truncates correctly. SVG export (export.go:258) reuses subLabel, so it picks up the emoji too. Please confirm your SVG font renders it.
  • Dependency: go-runewidth is already a direct dependency.

Points to address

  1. Comment style (logs.go, wrapLog): CLAUDE.md says no doc comments on unexported helpers, so the comment above wrapLog should go.
  2. Test is brittle (logs_test.go, TestLogsWrapLongLines): !strings.Contains(out, "…") checks the whole view, so any unrelated truncation elsewhere on screen (for example a clipped sub-label) would fail it. It also doesn't check the two-space continuation indent. Asserting on the panel's rows, or that the continuation row starts with " ", would pin the behavior down. Table-driven cases for wrapLog itself (short line, exact-width line, wide runes, w < 8) would be cheap, since the test file already uses package dashboard_test and you may need the //nolint:testpackage switch for unexported access.
  3. No test for the 55% panel (model.go, panelWidth): nothing covers m.logs.open. At width 90 the panel is 49 columns and the canvas is 90 - 49 - 3 = 38. Please check the map is still usable at that size. Right at the 90 threshold, the logs panel pushes the map close to the max(w, 10) floor on narrower terminals.
  4. Minor: the old code wrapped each line in lipgloss.MaxWidth(w) as a hard guard. wrapLog now guarantees the width itself, so it's fine, but the w < 8 path still goes through clip, so very narrow panels keep the "…" truncation. That seems intentional.

Docs: the generated docs and helpdoc changes match each other. CI will confirm make docs has no diff.

No blocking issues.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coryodaniel

Copy link
Copy Markdown
Member Author

Fixed in c068ded:

  • 1: removed the comment on wrapLog.
  • 2: TestLogsWrapLongLines now checks that the wrapped part is indented under the line it continues, instead of looking for … anywhere on screen.
  • 3: the logs panel widens to 55% only when the window is at least 120 columns, so the map keeps room on narrower terminals. Below that the panel keeps its usual width.
  • 4: agreed, the w < 8 path keeps the … on purpose.

@claude please review.

@claude

claude Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Claude finished @coryodaniel's task in 1m 22s —— View job


Re-review of #279 (after c068ded)

I read the diff against origin/dashboard-export and ran go test ./internal/commands/dashboard/, which passes. I didn't run make check, so lint is unchecked.

Earlier points

  1. Comment on wrapLog: removed.
  2. Wrap test: TestLogsWrapLongLines now checks that the continuation row is indented. That is better than looking for … anywhere on screen. One caveat is that the check slices on the first │ in the next row. If the layout ever puts a │ in the canvas to the left of the panel, the check would land in the wrong place. It's fine as the layout stands.
  3. 55% panel: the widening now applies only at 120 columns or wider (model.go:982). At exactly 120 the panel is 66 columns and the canvas is 120 - 66 - 3 = 51. That's a reasonable size, and narrower windows keep their usual layout. The new test runs at width 120, so it covers the widened path.
  4. w < 8: agreed, keeping the … there is intentional.

Remaining nits (non-blocking)

  • wrapLog has no direct table-driven test. Short line, exact-width line, wide runes and w < 8 would be cheap to add. Per CLAUDE.md that needs the //nolint:testpackage switch for unexported access, so it's optional.
  • The 🔭 label now flows into the SVG export through subLabel. Please confirm that your SVG font renders the emoji.

No blocking issues.

Base automatically changed from dashboard-export to dashboard November 30, 2026 06:12
@coryodaniel
coryodaniel merged commit 468f84d into dashboard Nov 30, 2026
2 checks passed
@coryodaniel
coryodaniel deleted the dashboard-polish branch November 30, 2026 06:13
@coryodaniel

Copy link
Copy Markdown
Member Author

Folded into #272.

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