# 0hmx - anyone else face this in regular? Channel: #contributor Source: https://discord.com/channels/1233487248129921135/1533914684111978498 Started: 2026-08-03T19:09:20.092000+00:00 Last activity: 2026-08-03T22:00:31.641000+00:00 ## 0hmx — 2026-08-03T19:09:19.449000+00:00 anyone else face this in regular? Attachment: image.png — https://community.tscircuit.com/media/1533914683990474873 ## astrimid — 2026-08-03T20:13:26.842000+00:00 Yes, I face this every couple of hours ## astrimid — 2026-08-03T20:14:36.492000+00:00 From my react experience, this happens when you wrap hook in a condition ## astrimid — 2026-08-03T20:16:28.750000+00:00 [attachment] Attachment: image.png — https://community.tscircuit.com/media/1533931583436881940 Attachment: image.png — https://community.tscircuit.com/media/1533931583763906762 ## astrimid — 2026-08-03T20:20:14.866000+00:00 So it looks like if there are any errors the ErrorTabComponent exits early and doesn't render anything, but then if error appear while the component is still mounted and there were no error previously, it would crash. If my theory is right, here are steps to reproduce: 1. Make sure there are no errors 2. Open error tab 3. Introduce a code change that triggers an error You should see the error/warning tab crashed ## astrimid — 2026-08-03T20:26:41.753000+00:00 First instance of this violation introduced here: https://github.com/tscircuit/runframe/pull/1524 This is a routine problem with react that is fixable by eslint rule `rules-of-hooks`: ``` { "plugins": ["react-hooks"], "rules": { "react-hooks/rules-of-hooks": "error", } } ``` ## astrimid — 2026-08-03T20:28:50.220000+00:00 the biome equivalent: https://biomejs.dev/linter/rules/use-hook-at-top-level/ ## astrimid — 2026-08-03T20:28:58.905000+00:00 Shows should be enabled by default ## astrimid — 2026-08-03T20:31:43.494000+00:00 https://github.com/tscircuit/runframe/pull/4295 If this fails, it probably means there's something wrong with biome documentation or version or config If this passes, it means, the biome doesn't catch the error, which would mean the problem with either biome not part of CI or ErrorTabComponent is excluded from linting. ## astrimid — 2026-08-03T20:32:35.921000+00:00 Ok. It passes. Which makes it more puzzling ## astrimid — 2026-08-03T20:34:47.306000+00:00 Ok. I checked the workflow files, and there's no trace of biome running at all, meaning that it's not a part of CI ## astrimid — 2026-08-03T20:54:17.842000+00:00 Yeah, biome wasn't running at all: https://github.com/tscircuit/runframe/actions/runs/30852249198/job/91814790604?pr=4296 ## astrimid — 2026-08-03T20:54:50.760000+00:00 <@757706909351411845> This is a kind of task I would delegate to AI ^ ## astrimid — 2026-08-03T20:55:04.370000+00:00 But I suspect it would fail meserably ## Seve — 2026-08-03T20:55:44.779000+00:00 rules of hooks aren't super great fwiw ## Seve — 2026-08-03T20:55:54.450000+00:00 but yea we definitely have some kind of hook issue here ## Seve — 2026-08-03T20:57:00.073000+00:00 rules of hooks are difficult to use w/ performance optimizations and it causes a lot of source code inflation ## Seve — 2026-08-03T20:57:16.937000+00:00 but we should get to the bottom of this, it is likely just one random hook causing the issue ## astrimid — 2026-08-03T20:58:07.235000+00:00 this is not difficult to use at all, this is a basic rule of react ## astrimid — 2026-08-03T20:58:17.075000+00:00 this is how react hooks inherently work ## astrimid — 2026-08-03T20:58:25.390000+00:00 by design ## astrimid — 2026-08-03T20:59:00.953000+00:00 [attachment] Attachment: image.png — https://community.tscircuit.com/media/1533942288563048479 ## Seve — 2026-08-03T20:59:01.705000+00:00 useEffect excessive dependency listing is an example of a major performance issue that rule of hook encourages ## Seve — 2026-08-03T20:59:31.347000+00:00 the linting of it is the issue, not the fundamental rules ## astrimid — 2026-08-03T21:00:01.207000+00:00 that's a separate lint rule: https://biomejs.dev/linter/rules/use-exhaustive-dependencies/ ## astrimid — 2026-08-03T21:00:42.893000+00:00 rule of hooks is a basic rule that would cause a component to crash if you don't follow it ## astrimid — 2026-08-03T21:00:55.130000+00:00 it is non-negotiable ## astrimid — 2026-08-03T21:01:34.003000+00:00 if you don't trust me, ask AI ## Seve — 2026-08-03T21:01:52.757000+00:00 it has nothing to do with that ## Seve — 2026-08-03T21:01:59.286000+00:00 you're literally referencing some random third party library ## Seve — 2026-08-03T21:02:05.533000+00:00 it isn't built into biome ## astrimid — 2026-08-03T21:02:36.433000+00:00 sorry, I don't understand ## astrimid — 2026-08-03T21:05:19.802000+00:00 I referenced rules-of-hooks because I assumed ESLint is used ## Seve — 2026-08-03T21:05:26.756000+00:00 it isn't ## astrimid — 2026-08-03T21:05:54.886000+00:00 So I corrected myself and referenced biome rule `use-hook-at-top-level/` ## astrimid — 2026-08-03T21:06:12.290000+00:00 which I added to biome.json ## astrimid — 2026-08-03T21:06:16.715000+00:00 it still passed ## astrimid — 2026-08-03T21:06:32.480000+00:00 so I dug deeper and discovered biome isn't being run at CI at all ## astrimid — 2026-08-03T21:06:45.773000+00:00 So I added the workflow to run biome ## astrimid — 2026-08-03T21:06:55.798000+00:00 Which expectedly failed with a number of issues ## Seve — 2026-08-03T21:06:58.943000+00:00 https://github.com/tscircuit/runframe/blob/main/.github/workflows/bun-formatcheck.yml ## Seve — 2026-08-03T21:07:26.068000+00:00 yea you're right i think tho- i don't think we're running linting ## Seve — 2026-08-03T21:07:32.802000+00:00 or if we are, we're allowing warnings ## astrimid — 2026-08-03T21:07:37.125000+00:00 This only checks formatting ## astrimid — 2026-08-03T21:07:40.083000+00:00 like prettier ## Seve — 2026-08-03T21:07:50.312000+00:00 but honestly ## astrimid — 2026-08-03T21:08:10.233000+00:00 I've literally posted a link with PR that fails linting: https://github.com/tscircuit/runframe/pull/4296 ## Seve — 2026-08-03T21:08:14.676000+00:00 linting is almost completely useless, the only thing that matters is fixing the bug ## astrimid — 2026-08-03T21:08:32.829000+00:00 This bug has been around for a year ## Seve — 2026-08-03T21:08:39.233000+00:00 sure ## astrimid — 2026-08-03T21:08:57.089000+00:00 Lint would've prevented it since it's trivial ## Seve — 2026-08-03T21:09:03.669000+00:00 i doubt that ## Seve — 2026-08-03T21:09:08.302000+00:00 but you can try to prove it ## Seve — 2026-08-03T21:09:13.951000+00:00 i maintain that linting is not very useful ## Seve — 2026-08-03T21:09:53.885000+00:00 not to be overly dick-ish but i absolutely hate linting contribs ## Seve — 2026-08-03T21:09:58.888000+00:00 massive waste of time ## Seve — 2026-08-03T21:10:44.046000+00:00 if we isolate the bug and prove linting fixes it then i think we would at least force the linting rule that fixed it into CI, but i don't think linting will catch it ## Seve — 2026-08-03T21:11:08.683000+00:00 for additional clarity, linting contribs plagued this project for a long time and we banned them, because they create far more bugs than they solve ## Seve — 2026-08-03T21:11:23.632000+00:00 you can imagine these are the easiest to ai contrib ## Seve — 2026-08-03T21:12:33.194000+00:00 even this i doubt is the root cause Attachment: image.png — https://community.tscircuit.com/media/1533945695701172234 ## astrimid — 2026-08-03T21:15:39.133000+00:00 [attachment] Attachment: image.png — https://community.tscircuit.com/media/1533946475242061864 ## Seve — 2026-08-03T21:15:56.038000+00:00 how was this reproduced? ## astrimid — 2026-08-03T21:16:35.530000+00:00 what exactly? ## Seve — 2026-08-03T21:16:46.429000+00:00 ^ ## Seve — 2026-08-03T21:17:10.504000+00:00 the error tab content has an obvious bug, but i'm not sure that's the actual root cause (hopefully it is) ## astrimid — 2026-08-03T21:18:01.103000+00:00 It's literally written on the screenshot "rendered fewer hooks than expected". This is an error message from react ## Seve — 2026-08-03T21:18:27.944000+00:00 yes we all know that is the error ## astrimid — 2026-08-03T21:18:29.906000+00:00 any time you change number of hooks by changing the conditional ## Seve — 2026-08-03T21:18:30.542000+00:00 how do you reproduce it is the question ## astrimid — 2026-08-03T21:18:38.840000+00:00 check the conditional ## Seve — 2026-08-03T21:18:49.371000+00:00 haha ## Seve — 2026-08-03T21:18:50.866000+00:00 dude ## astrimid — 2026-08-03T21:18:54.335000+00:00 try to change it with component still visible ## Seve — 2026-08-03T21:19:08.150000+00:00 we are some of the only people who have written a react fiber layer in the world ## Seve — 2026-08-03T21:19:13.818000+00:00 we know react extremely well ## Seve — 2026-08-03T21:19:29.011000+00:00 we know exactly how hooks work ## Seve — 2026-08-03T21:19:44.800000+00:00 the question is how does a user reproduce the issue ## Seve — 2026-08-03T21:20:01.436000+00:00 i.e. what action do they perform in RunFrame or with their circuit that causes this error page to appear ## Seve — 2026-08-03T21:20:14.236000+00:00 https://github.com/tscircuit/runframe/pull/4297 ## Seve — 2026-08-03T21:20:20.692000+00:00 ^ i'm suggesting that this is not the root cause ## astrimid — 2026-08-03T21:25:18.836000+00:00 I've posted the steps at the very start of the thread: 1. Create a circuit that doesn't cause any warnings or errors 2. Make sure the errors tab is open 3. Introduce a warning or error 4. Fix that warning or eror ## astrimid — 2026-08-03T21:26:00.298000+00:00 [attachment] Attachment: image.png — https://community.tscircuit.com/media/1533949080626008114 ## astrimid — 2026-08-03T21:26:10.344000+00:00 It's not that hard for a person who knows react really well ## astrimid — 2026-08-03T21:29:59.622000+00:00 what's hard is producing tsx circuit that has no warnings or errors ## Seve — 2026-08-03T21:32:44.630000+00:00 https://github.com/tscircuit/schematic-viewer/pull/248/files ## astrimid — 2026-08-03T21:39:18.784000+00:00 The lint error is gone ## astrimid — 2026-08-03T21:39:42.692000+00:00 So it was the only occurrence in runframe ## Seve — 2026-08-03T21:40:07.850000+00:00 check out the schematic-viewer PR, that is also an out of order issue- but not one a linter picks up ## Seve — 2026-08-03T21:42:15.117000+00:00 then you can introduce stuff like this that makes it easier to debug these failures with the actual components causing the issue https://github.com/tscircuit/runframe/pull/4304 ## astrimid — 2026-08-03T21:51:44.927000+00:00 This also looks like something biome would pick up, this is pretty mechanical: the code should not contain `use*` function after conditional return statements, there should be no conditionals at all between `use*` function calls. Attachment: image.png — https://community.tscircuit.com/media/1533955559345360916 ## Seve — 2026-08-03T21:52:21.660000+00:00 🤷 ## astrimid — 2026-08-03T21:58:47.654000+00:00 FYI in production this would be useless ## astrimid — 2026-08-03T21:59:52.471000+00:00 unless keepNames is true ## Seve — 2026-08-03T22:00:31.641000+00:00 yes perhaps!