Files
onionHEN/scripts
HexwellandClaude Fable 5 dccfa2ddf0 refactor(shellui): make HomeUI top-nav patch table-driven
patch_homeui_top_nav had grown to 667 lines because every firmware's byte
patterns were declared inside the function body, related to the offsets table
through a second HomeUiPatchByteSet lookup, and size-checked by 32
hand-written pairwise static_asserts. Adding a firmware meant edits in three
places that had to stay index-aligned.

Fold HomeUiPatchBytes into HomeUiPatchProfile and give each byte field a
fixed-size array type, which drops the byte-set enum, the second lookup and
every static_assert: a mistyped blob is now a compile error. Move the per
firmware data to homeui_top_nav_profiles.inc so adding a firmware is a
data-only change, and leave the function at 185 lines of patch logic.

The offline verifier kept its own copy of the offsets and source hashes;
point it at the .inc instead and derive the legacy-body special case from
the profile rather than a hardcoded byte-set name.

Patch data is unchanged: the table the compiler emits was diffed byte for
byte against the previous layout.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-26 19:50:02 +08:00
..
2026-07-18 20:35:16 +08:00
2026-07-09 23:48:02 +08:00
2026-07-09 23:48:02 +08:00