feat(devtui): rename Logs tab to Instance with grouped sources#1128
Conversation
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
There was a problem hiding this comment.
💡 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".
| for _, kind := range groupOrder { | ||
| var indices []int | ||
| for i, src := range m.sources { | ||
| if src.kind == kind { | ||
| indices = append(indices, i) |
There was a problem hiding this comment.
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 👍 / 👎.
| if i == m.active { | ||
| indicator = activeBadgeStyle.Render("●") | ||
| } else if src.kind == sourceProcess && (src.lineChan != nil || src.process != nil) && !src.dead { |
There was a problem hiding this comment.
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 👍 / 👎.
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
Logs→Instance(model, files, palette command, footer)logSourceKind(container/process/file) to each log sourceCONTAINERS,PROCESSES,LOG FILESheaders with fixed display order●(live/running) vs·(inactive/stopped) per source[container]/[process]/[file]▸marks the focused sidebar item for clear navigationenter → Select sourceandpgup/pgdn → ScrolllogDoneMsgnow carries the source name, preventing a stale log-done signal from clearing the wrong watcher's running stateChecklist
tab_instance_test.goupdated for renamed model)golangci-lintpasses with 0 issuesgo build ./...passesgo test ./internal/devtui/...passes (158 tests)