Skip to content

[codex] Fix preview environment selection highlight#428

Merged
JamesSprow merged 1 commit into
mainfrom
codex/fix-preview-env-selection
May 21, 2026
Merged

[codex] Fix preview environment selection highlight#428
JamesSprow merged 1 commit into
mainfrom
codex/fix-preview-env-selection

Conversation

@JamesSprow

Copy link
Copy Markdown
Collaborator

Summary

Fix the project navbar environment switcher so PR preview environments stay visually selected when they are the active environment.

Root cause

The layout-level currentEnv derived state only treated declared project environments as valid. When the stored environment was a preview environment, the UI fell back to the first regular environment for rendering, so the preview was active in state and the URL but not shown as selected.

What changed

  • accept preview environment names as valid current environment values in the top-level layout
  • preserve existing fallback behavior only when the stored environment matches neither a regular environment nor a preview environment

Validation

  • npm run check in ui

@JamesSprow
JamesSprow merged commit ec44895 into main May 21, 2026
6 checks passed
@JamesSprow
JamesSprow deleted the codex/fix-preview-env-selection branch May 21, 2026 23:09
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