Skip to content

fix: engine bugs, biome schema, and docs overhaul#19

Merged
marioprieta merged 1 commit intomainfrom
fix/engine-bugs-and-docs-overhaul
Mar 11, 2026
Merged

fix: engine bugs, biome schema, and docs overhaul#19
marioprieta merged 1 commit intomainfrom
fix/engine-bugs-and-docs-overhaul

Conversation

@marioprieta
Copy link
Copy Markdown
Owner

@marioprieta marioprieta commented Mar 11, 2026

Summary

  • 3 engine bug fixes in transitionEngine.tsx: stale deferredSystemRestoreRef on system→explicit, stale lastKnownOsSchemeRef in system mode entry, and false return from setTheme('system') causing select() pill revert
  • Biome schema updated from 2.4.0 → 2.4.6 to match installed CLI
  • 17 docs site .mdx files improved with clarifications on Fast Refresh, initialTheme read-once semantics, isTransitioning timing, capture failure detection, select() press lock, AsyncStorage validation, state manager comparison, nesting diagrams, migration checklist, and more
  • Skill files removed from repo (SKILL.md + references/) — now managed in external skills directory

Engine fixes

Bug Root cause Fix
Stale deferred ref on rapid system→explicit deferredSystemRestoreRef left over from system mode overrode explicit theme Clear ref when exiting system mode
System mode doesn't detect real OS scheme Appearance.setColorScheme override masks real OS value from listener Call setColorScheme('unspecified') in isSystemMode effect
select() pill reverts after system entry Recursive setTheme('system') returned false due to premature systemModeRef mutation Always return true from outer system entry block

Docs improvements (highlights)

  • Fast Refresh troubleshooting (both docs site and skill)
  • isTransitioning timing vs touch blocking distinction
  • Capture failure detection heuristic
  • onFinishHydration explanation + state manager comparison table
  • Nesting order diagram for Expo Router
  • Migration checklist with testing steps
  • "When to import" guide for exported types
  • AsyncStorage value validation

Engine fixes (transitionEngine.tsx):
- Clear deferredSystemRestoreRef on system→explicit transition to prevent stale override
- Lift explicit Appearance override in isSystemMode effect so system mode detects real OS scheme
- Always return true from system mode entry block to prevent select() pill revert
- Rewrite inline comments to why-only style

Biome:
- Update schema version from 2.4.0 to 2.4.6 to match installed CLI

Docs site (17 .mdx files):
- Add Fast Refresh troubleshooting section
- Clarify initialTheme read-once semantics in provider.mdx
- Add isTransitioning timing vs touch blocking distinction in use-theme.mdx
- Add capture failure detection guidance in callbacks.mdx
- Add select() rapid-tap protection docs
- Add AsyncStorage validation in persistence.mdx
- Add onFinishHydration explanation and state manager comparison table in zustand.mdx
- Add zero-flash startup definition in system-theme.mdx
- Clarify "underneath" and frame rate behavior in how-it-works.mdx
- Add inline explanations in quick-start.mdx
- Add useMemo explanation in react-navigation.mdx
- Add nesting order diagram and headerShown note in expo-router.mdx
- Add migration checklist in migration.mdx
- Add "When to import" section in types.mdx
- Add persistence callout for setTheme vs select in theme-picker.mdx
- Add press lock note in theme-toggle.mdx

Skill files (removed from repo, moved to external skills directory):
- SKILL.md and references/ deleted (managed externally now)
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-native-theme-transition Ready Ready Preview, Comment Mar 11, 2026 3:53pm

@marioprieta marioprieta merged commit b293ea7 into main Mar 11, 2026
8 checks passed
@marioprieta marioprieta deleted the fix/engine-bugs-and-docs-overhaul branch March 11, 2026 15:55
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