Skip to content

feat(devtui): rename Logs tab to Instance with grouped sources#1128

Merged
Soner (shyim) merged 1 commit into
nextfrom
feat/devtui-instance-tab
Jun 23, 2026
Merged

feat(devtui): rename Logs tab to Instance with grouped sources#1128
Soner (shyim) merged 1 commit into
nextfrom
feat/devtui-instance-tab

Conversation

@shyim

Copy link
Copy Markdown
Member

Description

Renames the Logs tab to Instance and reorganizes its sidebar into grouped source categories, giving users a clear view of the full instance stack — running containers, application processes (watchers), and log files.

Part of #1113 — Overview tab / Instance tab redesign.

Changes

  • Tab rename: LogsInstance (model, files, palette command, footer)
  • Source categorization: added logSourceKind (container/process/file) to each log source
  • Grouped sidebar: sources grouped under CONTAINERS, PROCESSES, LOG FILES headers with fixed display order
  • Status indicators: (live/running) vs · (inactive/stopped) per source
  • Kind badge: content area header shows [container] / [process] / [file]
  • Cursor indicator: marks the focused sidebar item for clear navigation
  • Footer shortcuts: added enter → Select source and pgup/pgdn → Scroll
  • No auto tab switching: removed automatic switch to Logs tab on watcher start/stop/error — user stays in control
  • Bugfix: logDoneMsg now carries the source name, preventing a stale log-done signal from clearing the wrong watcher's running state

Checklist

  • Code follows the project's coding conventions
  • Tests added/adjusted (tab_instance_test.go updated for renamed model)
  • golangci-lint passes with 0 issues
  • go build ./... passes
  • go test ./internal/devtui/... passes (158 tests)

Rename the Logs tab to "Instance" to reflect that it shows the full
instance stack — running containers, application processes (watchers),
and log files — not just logs.

- Rename LogsModel to InstanceModel, tabLogs to tabInstance, files
  tab_logs.go to tab_instance.go
- Add logSourceKind (container/process/file) to categorize sources
- Group sidebar sources under Containers, Processes, Log Files headers
  with a fixed display order regardless of insertion order
- Add status indicators per source (live dot vs inactive dot)
- Add kind badge (container/process/file) to the content area header
- Add cursor indicator for clear focus in the sidebar
- Reduce sidebar top padding to remove excess whitespace
- Update footer shortcuts: enter Select source, pgup/pgdn Scroll
- Remove automatic tab switching to Logs on watcher start/stop and
  watcher errors; user stays in control of the active tab
- Fix logDoneMsg to carry the source name, preventing a stale log-done
  signal from clearing the wrong watcher running state
@shyim Soner (shyim) marked this pull request as ready for review June 23, 2026 12:03
@shyim Soner (shyim) merged commit 9f60e82 into next Jun 23, 2026
2 checks passed
@shyim Soner (shyim) deleted the feat/devtui-instance-tab branch June 23, 2026 12:03

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3bf16797fe

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Comment on lines +179 to +183
for _, kind := range groupOrder {
var indices []int
for i, src := range m.sources {
if src.kind == kind {
indices = append(indices, i)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep keyboard navigation in rendered order

Grouping the rows here changes the visual order without changing the cursor order, which still increments/decrements raw m.sources indices in Update. In a normal session with discovered log files followed by an appended watcher source, the watcher renders in the Processes group above Log Files, so ↑/↓ jumps in the wrong visual direction and ↓ can be disabled on the watcher even though log-file rows are visibly below it.

Useful? React with 👍 / 👎.

Comment on lines +206 to +208
if i == m.active {
indicator = activeBadgeStyle.Render("●")
} else if src.kind == sourceProcess && (src.lineChan != nil || src.process != nil) && !src.dead {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Honor dead process state before marking rows live

When a process or line-channel source ends while it remains selected, Update(logDoneMsg) sets dead=true, but this branch renders every active row with the live indicator before consulting src.dead. That leaves a stopped watcher displayed as /LIVE, so users cannot tell that the selected process has actually exited.

Useful? React with 👍 / 👎.

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