r/reactjs • u/claudio_pi • 8h ago
Show /r/reactjs I let AI agents write my app's React UI, with strict rules. React Doctor gave it 100/100
https://thermi.app/?v=2I'm building thermi, a small always-on-top hardware monitor for Windows and Linux (temps, fans, FPS). The overlay is C#, but the settings app is React + Fluent UI, running in WebView2 on Windows and WebKitGTK on Linux: about 14k lines and 70 components. Here it is in action: https://github.com/claudiopi/thermi/blob/main/docs/images/gestures-settings.gif
AI agents wrote most of it, so I set a few rules early on. React holds no business logic: every decision comes from C# through a typed bridge. The tests run against recorded answers from that bridge. And any warning fails the build.
I was curious how it would hold up, so I ran React Doctor: 100/100, zero issues. Pretty happy with that, and always keen to learn, so if you spot something worth improving, I'm all ears.
1
u/Kamensky124 2h ago
Recorded bridge answers are the part I'd poke at. Recordings make UI tests pass in a world where the C# side may have stopped agreeing weeks ago, so the suite stays green while the real app breaks at the seam. React Doctor checking the React side of the wall is nice, but the failure mode with agent-written code is rarely inside one file, it's the contract between the two halves drifting while every test replays old tape.
Worth checking how recordings get refreshed: a schema check on the C# side that fails the build when a bridge answer changes shape turns drift into a loud error instead of a manual re-record whenever a test fails for a reason that looks real.
Does anything on the C# side version those bridge answers today, or is the contract only enforced by whatever the recorded fixtures happen to contain?
1
u/Independent-Bonus529 43m ago
I really like the idea of testing against recorded bridge responses. How do you keep those recordings in sync when the C# side changes? Also, are you enforcing the architectural rules through CI or just agent instructions?