Skip to content

refactor(egui): split the six longest files into modules - #134

Merged
klNuno merged 3 commits into
mainfrom
refactor/split-long-egui-files
Nov 22, 2026
Merged

klNuno merged 3 commits into
mainfrom
refactor/split-long-egui-files

Conversation

@klNuno

@klNuno klNuno commented Nov 22, 2026

Copy link
Copy Markdown
Owner

Note

Clanker Claude Opus 5.5 is responding on behalf of meetsu

Summary

Splits the six longest files of accshift-egui into submodule folders. Pure refactor: same public API, no behaviour or pixel change.

Before After
ui/text.rs (1764 lines) ui/text/{mod,book,fallback,layout,style,tests}.rs
ui/paint.rs (1734) ui/paint/{mod,clip,geometry,gradient,mesh,shadow,types,tests}.rs
dialog/theme_editor.rs (1629) theme_editor/{mod,controls,css_field,layout,sections}.rs
controls/editing.rs (1622) editing/{mod,input,layout,words,tests}.rs
onboarding/steps.rs (1402) steps/{mod,deal,deal_rows,features,welcome}.rs
soft.rs (1313) soft/{mod,events,paint,platform,present,window_ops,tests}.rs

Every new file is at most 504 lines.

Testing

  • Pixel parity: all 194 harness scenes (683 shots) rendered from 537b14c and from this branch. 0 shots differ consistently; the shots that differ between two runs of this branch differ just as much between two runs of the same base binary (known animation non-determinism).
  • build-safe node scripts/gates.mjs: exit 0 (fmt, clippy, 2055 Rust tests, worker, bundle, Stream Deck).
  • Not run locally: Linux and macOS builds (CI covers them).

verified

  • reviewed by GPT-6.2 Sol: 1 round, approved.
  • Compared Rust items, test annotations and public exports across all six splits. git diff --check 61fcb92..HEAD passed.
  • Windows gates and pixel comparisons ran before the base update. The egui tree is identical to the tested commit 79b17d4.

Related issue

None.

Tested on

  • Windows
  • macOS (CI)
  • Linux (CI)

Checklist

  • CI checks pass locally (see CONTRIBUTING.md)
  • Docs or wiki updated if the change is user-facing (internal refactor)
  • No secrets, session tokens or captured account data in the diff

@coderabbitai

coderabbitai Bot commented Nov 22, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 17 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f069506d-a4cd-4412-9615-9380b5669fde
Commits

Reviewing files that changed from the base of the PR and between 61fcb92 and 4cf0c6a.

Files selected for processing: 42

  • crates/accshift-egui/src/soft.rs
  • crates/accshift-egui/src/soft/events.rs
  • crates/accshift-egui/src/soft/mod.rs
  • crates/accshift-egui/src/soft/paint.rs
  • crates/accshift-egui/src/soft/platform.rs
  • crates/accshift-egui/src/soft/present.rs
  • crates/accshift-egui/src/soft/tests.rs
  • crates/accshift-egui/src/soft/window_ops.rs
  • crates/accshift-egui/src/ui/components/controls/editing.rs
  • crates/accshift-egui/src/ui/components/controls/editing/input.rs
  • crates/accshift-egui/src/ui/components/controls/editing/layout.rs
  • crates/accshift-egui/src/ui/components/controls/editing/mod.rs
  • crates/accshift-egui/src/ui/components/controls/editing/tests.rs
  • crates/accshift-egui/src/ui/components/controls/editing/words.rs
  • crates/accshift-egui/src/ui/components/dialog/theme_editor.rs
  • crates/accshift-egui/src/ui/components/dialog/theme_editor/controls.rs
  • crates/accshift-egui/src/ui/components/dialog/theme_editor/css_field.rs
  • crates/accshift-egui/src/ui/components/dialog/theme_editor/layout.rs
  • crates/accshift-egui/src/ui/components/dialog/theme_editor/mod.rs
  • crates/accshift-egui/src/ui/components/dialog/theme_editor/sections.rs
  • crates/accshift-egui/src/ui/components/onboarding/steps.rs
  • crates/accshift-egui/src/ui/components/onboarding/steps/deal.rs
  • crates/accshift-egui/src/ui/components/onboarding/steps/deal_rows.rs
  • crates/accshift-egui/src/ui/components/onboarding/steps/features.rs
  • crates/accshift-egui/src/ui/components/onboarding/steps/mod.rs
  • crates/accshift-egui/src/ui/components/onboarding/steps/welcome.rs
  • crates/accshift-egui/src/ui/paint.rs
  • crates/accshift-egui/src/ui/paint/clip.rs
  • crates/accshift-egui/src/ui/paint/geometry.rs
  • crates/accshift-egui/src/ui/paint/gradient.rs
  • crates/accshift-egui/src/ui/paint/mesh.rs
  • crates/accshift-egui/src/ui/paint/mod.rs
  • crates/accshift-egui/src/ui/paint/shadow.rs
  • crates/accshift-egui/src/ui/paint/tests.rs
  • crates/accshift-egui/src/ui/paint/types.rs
  • crates/accshift-egui/src/ui/text.rs
  • crates/accshift-egui/src/ui/text/book.rs
  • crates/accshift-egui/src/ui/text/fallback.rs
  • crates/accshift-egui/src/ui/text/layout.rs
  • crates/accshift-egui/src/ui/text/mod.rs
  • crates/accshift-egui/src/ui/text/style.rs
  • crates/accshift-egui/src/ui/text/tests.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@mtsu-patrol mtsu-patrol Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Note

Partial review: part of the review did not complete, so other issues may remain.

  • This patrol read 34 of the 42 files to review within its budget; a follow-up patrol of this revision reads the 8 others.

@mtsu-patrol

mtsu-patrol Bot commented Nov 22, 2026

Copy link
Copy Markdown

This pull request breaks six very long files in accshift-egui into smaller module folders so each file is shorter and easier to work with. The code is moved as-is with the same public items and behavior.

No comments posted: the reviewers raised no finding.

Note

Partial review: part of the review did not complete, so other issues may remain.

  • This patrol read 34 of the 42 files to review within its budget; a follow-up patrol of this revision reads the 8 others.
Review details
  • Model: muse-spark-1.3-contributor
  • Compared commits: 61fcb92 to 4cf0c6a
  • Execution: tests could run in a disposable Linux sandbox
  • Files reviewed: 34 of 42
  • Duration: 7 min 31 s
Files skipped (8)
  • crates/accshift-egui/src/ui/components/onboarding/steps/deal.rs: left for a follow-up patrol of this revision
  • crates/accshift-egui/src/ui/components/controls/editing/input.rs: left for a follow-up patrol of this revision
  • crates/accshift-egui/src/ui/text/book.rs: left for a follow-up patrol of this revision
  • crates/accshift-egui/src/ui/text/layout.rs: left for a follow-up patrol of this revision
  • crates/accshift-egui/src/soft/tests.rs: left for a follow-up patrol of this revision
  • crates/accshift-egui/src/ui/paint/tests.rs: left for a follow-up patrol of this revision
  • crates/accshift-egui/src/ui/text/tests.rs: left for a follow-up patrol of this revision
  • crates/accshift-egui/src/ui/components/controls/editing/tests.rs: left for a follow-up patrol of this revision
Limitations (1)
  • This patrol read 34 of the 42 files to review within its budget; a follow-up patrol of this revision reads the 8 others.
Commands run (11)

No checks passed: sandbox has no Rust toolchain (no rustc/cargo/rustup), no C toolchain (no gcc/clang/ld/ar/pkg-config) or X11/Wayland dev libs, and apt is present but has no configuration at all (no /etc/apt, no sources, no os-release identity), so dependencies could not be installed as uid=1001 without sudo. Verified by inspection only: all six new submodule folders exist with expected files (soft, ui/text, ui/paint, editing, theme_editor, steps), and git log confirms HEAD 4cf0c6a is the soft.rs split commit; git status is clean. The pure-refactor claim (same public API, no behaviour change) and the PR's Windows pixel-parity/gates results could not be reproduced here; Linux/macOS builds remain CI-covered per the PR text.

passed · exit 0 · 0 s

ls -R /work | head -n 200; echo "---"; cat /work/README.md 2>/dev/null | head -n 150; echo "==="; cat /work/package.json 2>/dev/null | head -n 100; echo "==="; cat /work/Cargo.toml 2>/dev/null | head -n 100; echo "==="; cat /work/.github/CONTRIBUTING.md 2>/dev/null | head -n 200

passed · exit 0 · 0 s

ls /work/crates/accshift-egui/src/ 2>&1 | head -n 50; echo "==="; ls /work/crates/accshift-egui/src/ui/text/ /work/crates/accshift-egui/src/ui/paint/ /work/crates/accshift-egui/src/soft/ 2>&1; echo "==="; rustc --version; cargo --version; echo "==="; cat /work/crates/accshift-egui/Cargo.toml | head -n 80

failed · exit 1 · 0 s

echo $PATH; ls /root/.cargo/bin/ 2>&1 | head -n 20; ls /usr/local/cargo/bin/ 2>&1 | head -n 20; ls /opt/rust*/bin 2>&1 | head; which rustup 2>&1; find / -maxdepth 5 -name cargo -type f 2>/dev/null | head -n 10
/usr/local/bin:/usr/bin:/bin
ls: cannot access '/root/.cargo/bin/': No such file or directory
ls: cannot access '/usr/local/cargo/bin/': No such file or directory
ls: cannot access '/opt/rust*/bin': No such file or directory
/bin/bash: line 1: which: command not found

failed · exit 1 · 0 s

ls /usr/local/lib/ 2>&1 | head -n 30; echo "==="; ls /opt/ 2>&1; echo "==="; ls ~/ 2>&1; echo "==="; env | sort | head -n 40; echo "==="; ls /work/*.mjs /work/scripts/ 2>&1 | head -n 30; echo "==="; cat /work/rust-toolchain* 2>&1; echo "==="; find / -maxdepth 6 -name "rustc" 2>/dev/null | head
node-v24.21.0-linux-x64
patrol-browser
patrol-bun
python3.12
===
ls: cannot access '/opt/': No such file or directory
===
ls: cannot access '/work/.patrol-home/': No such file or directory
===
CI=1
HOME=/work/.patrol-home
INVOCATION_ID=c4a79ef4cb794029ab24081d77e15827
PATH=/usr/local/bin:/usr/bin:/bin
PLAYWRIGHT_BROWSERS_PATH=/usr/local/lib/patrol-browser/browsers
PWD=/work
SHLVL=1
SystemRoot=
_=/usr/bin/env
===
ls: cannot access '/work/*.mjs': No such file or directory
/work/scripts/:
gates.mjs
monthly-stats-snapshot.sh
===
cat: '/work/rust-toolchain*': No such file or directory
===

passed · exit 0 · 0 s

ls -la /usr/local/bin/ 2>&1 | head -n 50; echo "===NODE==="; ls /usr/local/lib/node-v24.21.0-linux-x64/bin/ 2>&1 | head; /usr/local/lib/node-v24.21.0-linux-x64/bin/node --version 2>&1; echo "===BUN==="; ls /usr/local/lib/patrol-bun/ 2>&1 | head -n 20; echo "===PY==="; python3 --version 2>&1; echo "===GATES==="; head -n 120 /work/scripts/gates.mjs 2>&1; echo "===CONTRIB==="; head -n 150 /work/.github/CONTRIBUTING.md 2>&1

passed · exit 0 · 0 s

id 2>&1; echo "==="; curl --version 2>&1 | head -n 3; wget --version 2>&1 | head -n 3; echo "==="; apt-get --version 2>&1 | head -n 3; echo "==="; df -h 2>&1 | head -n 10; free -m 2>&1 | head -n 10; echo "==="; ls -la /work/crates/accshift-egui/src/ui/text/ /work/crates/accshift-egui/src/ui/paint/ 2>&1; echo "==="; wc -l /work/crates/accshift-egui/src/soft/*.rs /work/crates/accshift-egui/src/ui/text/*.rs /work/crates/accshift-egui/src/ui/paint/*.rs 2>&1 | head -n 40

passed · exit 0 · 0 s

git -C /work status --short | head -n 30; echo "==="; git -C /work log --oneline -5; echo "==="; ls /work/crates/accshift-egui/src/ui/components/controls/editing/ /work/crates/accshift-egui/src/ui/components/dialog/theme_editor/ /work/crates/accshift-egui/src/ui/components/onboarding/steps/ /work/crates/accshift-egui/src/soft/ 2>&1; echo "==="; wc -l /work/crates/accshift-egui/src/ui/components/controls/editing/*.rs /work/crates/accshift-egui/src/ui/components/dialog/theme_editor/*.rs /work/crates/accshift-egui/src/ui/components/onboarding/steps/*.rs 2>&1; echo "==="; git -C /work show --stat HEAD | head -n 60

passed · exit 0 · 0 s

id 2>&1; sudo -n true 2>&1; echo "==="; df -h /work /tmp $HOME 2>&1; echo "===GATES==="; cat /work/scripts/gates.mjs 2>&1 | head -n 200

passed · exit 0 · 0 s

mkdir -p /work/.patrol-home && export HOME=/work/.patrol-home; echo "HOME=$HOME"; echo "===CONTRIB-LINUX==="; grep -n -i -A15 "linux\|apt\|prereq\|dependenc" /work/.github/CONTRIBUTING.md 2>&1 | head -n 80; echo "===TOOLCHAIN==="; gcc --version 2>&1 | head -n 2; pkg-config --version 2>&1; echo "===LIBS==="; ldconfig -p 2>/dev/null | grep -i -E "libX11|libxkb|libGL|libwayland|fontconfig|freetype" | head -n 20; echo "===PKGCONF==="; pkg-config --exists x11 && echo "x11 present" || echo "x11 MISSING"; pkg-config --exists wayland-client && echo "wayland present" || echo "wayland MISSING"; pkg-config --exists fontconfig && echo "fontconfig present" || echo "fontconfig MISSING"

passed · exit 0 · 0 s

export HOME=/work/.patrol-home; cat /etc/os-release 2>&1 | head -n 5; echo "===APT==="; apt-get --version 2>&1 | head -n 2; dpkg-deb --version 2>&1 | head -n 2; echo "===NET==="; curl --version 2>&1 | head -n 2; wget --version 2>&1 | head -n 2; python3 -c "import urllib.request; print('urllib ok')" 2>&1; echo "===CC-SEARCH==="; ls /usr/bin/ 2>&1 | grep -i -E "gcc|clang|cc$|ld$|ar$|make" | head; echo "===RUSTUP-DL==="; curl -sSf -o /tmp/rustup-init.sh https://sh.rustup.rs 2>&1 | head -n 5; ls -la /tmp/rustup-init.sh 2>&1

passed · exit 0 · 0 s

export HOME=/work/.patrol-home; ls /etc/apt/ 2>&1; cat /etc/apt/sources.list 2>&1 | head -n 10; cat /etc/apt/sources.list.d/*.list 2>&1 | head -n 20; echo "===UPDATE-TEST==="; mkdir -p /tmp/apt/lists/partial /tmp/apt/cache/archives/partial && apt-get -o Dir::State::Lists=/tmp/apt/lists -o Dir::Cache::Archives=/tmp/apt/cache/archives -o Debug::NoLocking=1 update 2>&1 | tail -n 15

@klNuno
klNuno merged commit d2fc9c9 into main Nov 22, 2026
9 checks passed
@klNuno
klNuno deleted the refactor/split-long-egui-files branch November 22, 2026 16:50
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