Skip to content

[fix] F12: auto-quality stops flapping (water refraction) + one notice per lowered toggle - #349

Closed
AlexZ005 wants to merge 2 commits into
feat/40from
feat/40-render
Closed

AlexZ005 wants to merge 2 commits into
feat/40from
feat/40-render

Conversation

@AlexZ005

@AlexZ005 AlexZ005 commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Roadmap 40 F12: water refractions switched off/on by themselves on the phone (refractions-off.jpg / refractions--on.jpg).

Cause

The phone quality governor flapped between level 5 (resolution 61 %: water on the half-res screen-space tier, refraction on) and level 6 ("post off": water on the Quest tier, refraction off). At level 6 the frames are cheap, so it recovered after 10 s; at level 5 the water pass came back and overloaded 3 s later. The old flap rule only doubled the recovery hold (10/20/40/80 s), so on v1.31.0 it kept switching. Measured with the same synthetic drive: 19 switches in 10 min on v1.31.0, 3 with this PR (off, one retry, off, then held).

Changes

  • Flap lock (qualityGovernorCore): stepping back up to the level a recovery just left (within the flap window) makes that level the lowest recovery may reach until a new scene, Keep full quality, or the auto-quality switch. Water, fluid, HDRI tier, shadows, resolution, AO, post-processing and particles all follow the governor level, so they all get this rule. A scene that becomes light still walks back down.
  • Auto-quality notice (AutoQualityNotice.svelte + pure qualityNoticeCore.js): when the device lowers something on its own, it says so once per toggle per session, as a single kit toast per drop: "Lowered water quality and the scene look to keep it smooth · Keep full quality". Only automatic drops count (game presets and the headset floor don't). A drop made in Play or in a headset waits until you're back in the editor. Keep full quality gives full quality for the rest of the page session and doesn't change the Settings switch. This replaces the object list's first-step toast and SimplifiedWaterNotice.
  • The quality chip's tooltip says the reduction "stays this way for this scene" while a level is held.

Proof

  • unit: qualityFlapLock (10-minute phone simulation; with the lock disabled it reads >8 switches, and 2 tests go red), qualityNotice, updated flap test; vitest 1898/1898
  • e2e: new auto-quality-notice (phone 390×844 touch + desktop 1440×900, in-suite counterfactual of 15 switches without the lock, taps Keep full quality); fb-water-phone part 3 now asserts that a game preset is not announced; green: perf-governor, quality-phone, fb-water-phone, fluid-flows, game-shell, lod, perf-recorder
  • scene-load timing checks (1.4/2.1/6.3 at CPU ×6) fail on pristine v1.31.0 as well (A/B'd twice): environmental, not this PR
  • svelte-check 300/41 = baseline; check:tokens clean; build green
  • shots (before = v1.31.0, after = this branch; phone + desktop, dark + light): ~/.code/lanes-30/after-40/40-render/shots/

🤖 Generated with Claude Code

AlexZ005 and others added 2 commits October 8, 2026 13:48
… back and forth

- 40 F12: on a phone Aquarium's water refraction switched off and on by itself. The
  governor walked 6 -> 5 after 10 s of cheap frames at "post off", level 5 brought the
  screen-space water pass back and overloaded 3 s later; doubling the recovery hold only
  slowed the flap (10/20/40/80 s)
- a step back UP to the level a recovery just left (within flapWindowMs) now locks that
  level as the lowest recovery may reach, until clearFlapLock: a new scene (load end),
  releaseQuality / keepFullQuality, or the auto-quality switch. Every auto toggle (water,
  fluid, HDRI tier, shadows, resolution, AO, post, particles) derives from the level, so
  all of them get the rule. A scene that becomes light still walks back
- keepFullQuality(): full quality and no automatic step for the rest of the page session
  (not saved; the Settings auto switch stays on)
- unit: qualityFlapLock (10-minute phone simulation, counterfactual: >8 refraction
  switches without the lock, <=3 with it), the old flap test now ends in the lock

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… full quality" per toggle

- 40 F12: when the device lowers a quality toggle on its own it says so once per toggle per
  session, batched per drop: "Lowered water quality and the scene look to keep it smooth"
  with a "Keep full quality" action (keepFullQuality: full quality for the rest of the page
  session, the Settings auto switch untouched)
- the rule is pure (qualityNoticeCore: which toggles, newly lowered, the words); the
  AutoQualityNotice component watches qualityOverrides + simplifiedWater, counts only
  automatic drops (frames / long tasks / the phone's lighter start, never a game preset or
  the headset floor), holds a drop made in Play or a headset until you are back, and judges
  in a microtask because publish writes the overrides before the reason
- replaces the object list's first-step toast (gone whenever that window was closed) and
  SimplifiedWaterNotice; the quality chip says "stays this way for this scene" while held
- governorForTest: setLevel on a synthetic clock, flapLock / clearFlapLock
- e2e auto-quality-notice (phone 390x844 touch + desktop 1440x900: the drop, one retry, held
  for 10 min, counterfactual 15 switches, scene load clears the lock, Play deferral, tap
  Keep full quality, shadows on desktop); fb-water-phone part 3 asserts a game preset is
  not announced; unit qualityNotice

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@AlexZ005

Copy link
Copy Markdown
Collaborator Author

Included in 1.32.0: merged into feat/40-int → feat/41 → release PR #365 (v1.32.0, 862ed79). Closing as included.

@AlexZ005 AlexZ005 closed this Oct 13, 2026
@AlexZ005
AlexZ005 deleted the feat/40-render branch October 23, 2026 11:17
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