Skip to content

fix(devtui): surface config save errors to the user#1029

Merged
Soner (shyim) merged 2 commits into
nextfrom
fix/devtui-config-save-errors
May 18, 2026
Merged

fix(devtui): surface config save errors to the user#1029
Soner (shyim) merged 2 commits into
nextfrom
fix/devtui-config-save-errors

Conversation

@shyim

Copy link
Copy Markdown
Member

Summary

  • Propagate WriteConfig / WriteLocalConfig errors from the config tab through configSavedMsg instead of discarding them with _ =
  • Show the error under the save row and swap the button label to "Retry Save"; editing any field clears the stale error
  • Addresses item Change command to shopware-cli #7 from CODE_IMPROVEMENTS.md

Previously a failed write (disk full, read-only mount, permissions) still displayed a green "Saved" badge while the config was never persisted.

Test plan

  • go build ./...
  • go vet ./internal/devtui/
  • go test ./internal/devtui/
  • Manually trigger a write failure (e.g. chmod -w .shopware-project.yml) and confirm the error overlay renders and Retry Save re-attempts the write

WriteConfig/WriteLocalConfig errors in the config tab were discarded,
so a failed write (disk full, permissions) showed a "Saved" badge while
data was not persisted. Propagate the error through configSavedMsg,
display it under the save row, and swap the button to "Retry Save".

@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: b19ce73c1d

ℹ️ 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 thread internal/devtui/model_update.go Outdated
Codex review on #1029 flagged a race: an async configSavedMsg returning
after the user typed more changes would clear `modified` and mask the
newer unsaved edits. Config writes are local file ops — do them inline,
update saved/modified/err directly, and drop the now-unused message.
@shyim Soner (shyim) merged commit 928940f into next May 18, 2026
2 checks passed
@shyim Soner (shyim) deleted the fix/devtui-config-save-errors branch May 18, 2026 05:32
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