Configbuilder: refactor & clean up code
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 322
- Forks
- 255
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 5
Description
Description
Some of the code requires refactoring and cleaning up to improve readability and maintainability. Additionally, some screens, e.g. FinalInfraDetails, load slowly and with some visual glitches.
Example
One area for improvement is the handling of button presses.
- Capturing button presses isn’t consistent; sometimes we are using the
@ondecorator, other times we are defining a specialon_button_pressedmethod. This could be standardised. - Some button press logic is defined globally in the
ConfigsCreateAppclass, others are defined within the screens they appear on. This makes sense for thebackbutton logic which has the global effect of runningself.pop_screen(), but might not be the best place to put other event handlers, and can make it difficult to work out the flow of the app. - When
nextbuttons are pushed, many screens run similar code to iterate through the text fields on the screen and add the data to the Pydantic model. This results in some code duplication. Could we clean this up and create a single method that all screens could use?
Tasks
- Identify places in the app code that could be refactored, consolidated, or otherwise re-written to improve readability and maintainability.
- The major places for refactoring will be in the
utils.pymodule and any code related to updating and validating the Pydantic model.
- The major places for refactoring will be in the
- (Optional) For large refactors, create a sub-issue to track the work
- Update code accordingly and test
We'll be working on this issue at the 2026 hackathon Sydney hub
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in utils.py and ConfigsCreateApp, then trace the screen code around FinalInfraDetails and the Pydantic model updates and validation. Review the duplicated button handlers and next-button field processing first; done means the refactoring is implemented and the affected code is tested without the reported slow loading or visual glitches.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100