Fix: dev-tools island visibility (gate on availability, not DEV) (0289) - #429
Merged
Merged
Conversation
The docked dev-tools island was gated on import.meta.env.DEV, but the full devtools provider is bundled in more builds than that (deploy-preview / prod-ish), where the old floating FAB used to show. So the island vanished there while the status bar didn't reserve its space. Gate instead on a new DevToolsContextValue.available flag (true in the real provider, false in the prod stub), so the island appears exactly where the FAB did. Signed-off-by: xNet Test <test@xnet.dev>
Contributor
🖼️ UI changes in this PRNo visual differences detected in the changed UI. |
Contributor
|
Preview removed for PR #429. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The docked dev-tools island (0287, beside the status bar) was gated on
import.meta.env.DEV. But the full@xnetjs/devtoolsprovider is bundled in more builds than just the local dev server (the deploy-preview / prod-ish builds resolve the package'simportexport condition to the real implementation) — that's where the old floating FAB used to show. So the island disappeared in those builds, and since it wasn't rendered, the status-bar island didn't reserve its 32px slot (the button looked "hidden behind" the status bar).Fix
Add an
availableflag toDevToolsContextValue—truein the real provider,falsein the production stub — and gate the island onuseDevTools().availableinstead ofimport.meta.env.DEV. Now the island appears exactly where the FAB did (wherever the real provider is mounted), and the status row reserves its space accordingly. No change in the local dev server (still shows).Verification
pnpm typecheck(bothxnet-weband@xnetjs/devtools) clean.@xnetjs/devtools+apps/webare private → no changeset; changelog fragment added.🤖 Generated with Claude Code