Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix stale error display in stacks view (#236)#242

Merged
clangenb merged 2 commits into
mainfrom
fix/236-stale-stack-errors
Feb 19, 2026
Merged

Fix stale error display in stacks view (#236)#242
clangenb merged 2 commits into
mainfrom
fix/236-stale-stack-errors

Conversation

@eldara-cruncher
Copy link
Copy Markdown
Collaborator

@eldara-cruncher eldara-cruncher commented Feb 19, 2026

Summary

  • Fixes Show error at stack view cached #236: after fixing a service error and navigating back, the stacks view still showed the old error
  • Root cause: goBack() restores the previous model instance from the view stack, but OnEnter() returned nil — no data refresh was triggered, so stackHasError/stackErrorText maps retained stale values
  • Additionally, checkStacksCmd hashes StackEntry{Name, ServiceCount, NodeCount} which doesn't include error state, so the polling loop couldn't detect error-only changes either
  • Fix: OnEnter() now returns LoadStacksCmd(m.nodeID), which unconditionally recomputes error maps from the current snapshot

Test plan

  • go build ./...
  • go vet ./...
  • go test -race -count=1 ./views/stacks/ -v
  • go test -race -count=1 ./...
  • golangci-lint run ./... — 0 issues
  • Manual: deploy a broken service, observe error in stacks view, fix it, press Escape back — error should clear

🤖 Generated with Claude Code

OnEnter() now triggers LoadStacksCmd to recompute error maps from
fresh snapshot data when returning to stacks view via back navigation.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@mosonyi
Copy link
Copy Markdown
Collaborator

mosonyi commented Feb 19, 2026

Checked it, works

@clangenb clangenb merged commit 7d481c6 into main Feb 19, 2026
11 checks passed
@eldara-cruncher eldara-cruncher deleted the fix/236-stale-stack-errors branch June 5, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show error at stack view cached

3 participants