Repository navigation
refactor(ui): split the 1,800-line layout by screen half and by widget - #64
Merged
Merged
Conversation
layout.c keeps the geometry, the hit tests and the palette; the top and bottom screens, the post drawing and the shared widgets move to layout_top, layout_bottom, layout_post and layout_widgets, sharing layout_internal.h. No change to what is drawn: all 148 snapshots are byte-identical. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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 this changes
src/ui/layout.cwas 1,831 lines. It is now 295: where every control is, the hit tests and the palette. The top screens moved tolayout_top.c, the bottom (touch) screens tolayout_bottom.c, post drawing tolayout_post.cand the pieces every screen reuses (a title, a paragraph, a pill, a list row, an avatar) tolayout_widgets.c. All the#defines moved tolayout_internal.h. Bodies moved verbatim apart from anindigo_layout_prefix on what crosses files, and the profile screen asksindigo_layout_button_rectfor the follow button instead of reading a file-scope constant. Part of the atomic-files rule. Part of #53.Verification
Host:
make test(4019 checks, 0 failures under ASan and UBSan) andmake warningsclean. I rendered all 148 snapshots before and after the change and they are byte-identical, so nothing drawn moved. The 3DS build (devkitARM) links with no warnings. Nothing ran on Azahar or a 3DS.Docs
AGENTS.md names the new files.
Changelog: none — an internal reorganisation; every rendered screen is identical.
Checklist
CI gateandflow / conventions)🤖 Generated with Claude Code
Replaces #63, which conflicted with #62 in mk/host.mk.