Repository navigation
refactor: write once what was written out in several places - #125
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
Five refactors from the code quality audit of 2026-10-16. Each one writes once a rule, a mapping or a width that was written out in several places. Nothing changes for someone using urga: the screens draw the same and the requests are the same.
*means every namespace" lives innomad.EveryNamespace, and "something new goes todefaultthen" innomad.TargetNamespace. Five copies innomadanduiuse them.newDeployment, for the list and for the deployment screen. Deployments, namespaces, evaluations, variables, node pools and plugins go throughlisted. Characterization tests now assert the whole of each list item.Model.innerWidth, used by the table, the text, the panel and the bar, and by the tests.tableIndentthroughpanelRow, and the shared loop over lines of fields isfieldLineRows. Seven panels, the checks title, the deployment groups, the client charts and the token hint under a table use them. Each panel still leaves an empty line out, or keeps it, as it did before.applyWhenand its flag and callback are gone.markAnsweredmarks the screen answered and schedules the poll, andapplyList(view)only checks that the screen is still open. A new test covers what that check guards: a list answer that arrives for a screen that was left changes nothing.Closes #118
Closes #119
Closes #120
Closes #121
Closes #122
Checklist
make checkis greenfeat(ui): ...,fix(nomad): ...