Skip to content

refactor: split the largest files; no behavior change - #57

Merged
Rovey merged 10 commits into
mainfrom
cleanup/2026-10-18
Oct 18, 2026
Merged

Rovey merged 10 commits into
mainfrom
cleanup/2026-10-18

Conversation

@Rovey

@Rovey Rovey commented Oct 18, 2026

Copy link
Copy Markdown
Owner

What

The four files that had grown too large are split by responsibility. Code is moved, not rewritten.

File Before After
tests/test_search.cpp 3420 lines 6 topic files + search_fixture.hpp
src/app/common.cpp 1351 common.cpp + 6 common_*.cpp + common_internal.hpp
src/app/gui/ui.cpp 1409 ui.cpp (frame) + ui_widgets + one file per page
src/app/main.cpp 718 main.cpp (dispatch, usage) + cli_hardware.cpp + cli_runs.cpp

Also: docs/development.md and AGENTS.md describe the new layout (and name guarded_gpu and the icon sources), and the unused first README hero (.github/assets/hero.svg) is removed.

Left alone on purpose: src/app/gui/main_gui.cpp (1449 lines) shares one global state across window, device, tray and timers and can only be checked by hand.

Checks

  • core_tests 456/456 and app_tests 22/22, before and after; Release /W4 /WX
  • every string literal in the moved GUI and CLI code is identical; gao --help, --version and two error outputs (with exit codes) byte-identical
  • an independent review of the whole diff: three stale comments, fixed
  • the window opened on the RTX 5070 with this build: Dashboard, Optimize, Fan and About render as before

🤖 Generated with Claude Code

Rovey and others added 10 commits October 18, 2026 11:15
Move the modelled card, the run fixture and the journal and event helpers
into tests/search_fixture.hpp as inline functions, and spread the test
cases over files for the bandwidth scan, the search bounds, the recovery
gate, the reset budget and the checks against stock. Test names and
assertions are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
common.cpp keeps the process, lock, config and log helpers. The runs move
to common_run_steps.cpp (stock measurement, fan reads, put-back after a
stop), common_optimize.cpp (overclock and undervolt), common_retest.cpp and
common_all_in_one.cpp (fan step and the all-in-one run); the result lines
to common_results.cpp; logon apply, boot on/off and updates to
common_boot.cpp. Helpers several of them need are declared in
common_internal.hpp. Code is moved unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the shared colours, icons, fonts, widgets and text helpers to
ui_widgets.{hpp,cpp}, and the dashboard, Fan, Optimize (choose and run
screen), results and About pages to their own files. ui.cpp keeps the
frame and navigation. Code is moved unchanged; g_bold has one definition
and g_regular and g_full_log stay in the only file that uses them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main.cpp keeps the entry point, the argument dispatch and the usage
text. The commands that read or set the card directly move to
cli_hardware.cpp, the stress tests and runs with their Ctrl+C handling
to cli_runs.cpp; cli_commands.hpp declares them and the shared run
state (g_abort, g_busy_ok), defined once in cli_runs.cpp. Code moved
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
.github/assets/hero.svg is the README's hero from 2026-09-20; the README has
used docs/images/hero.svg since, and nothing else references it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Rovey
Rovey merged commit 6509fb3 into main Oct 18, 2026
2 checks passed
@Rovey Rovey mentioned this pull request Oct 18, 2026
@Rovey
Rovey deleted the cleanup/2026-10-18 branch October 25, 2026 20:42
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