feat(app): add debug layout direction toggle - #40393
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a DebugBar control to force LTR/RTL layout independent of the selected language, and threads that override through the app’s document root dir plus the UI/Kobalte i18n provider so directional UI (menus/submenus) mirrors correctly.
Changes:
- Add layout-direction override state to the app language context and apply it to
document.documentElement.dir. - Bridge a separate
layoutLocaleinto@opencode-ai/ui’sI18nProviderto drive Kobalte’s direction behavior. - Localize new DebugBar direction + focus controls across all supported app locales.
Reviewed changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/ui/src/context/i18n.tsx | Allows an optional layoutLocale to drive Kobalte’s I18nProvider locale (for direction) independently of translation locale. |
| packages/app/src/context/language.tsx | Introduces direction override state, computes direction/layoutLocale, and applies dir to the document root. |
| packages/app/src/components/debug-bar.tsx | Adds DIR toggle UI and refactors focus into a generic toggle cell; adjusts grid spans to fit. |
| packages/app/src/app.tsx | Passes layoutLocale through the UI i18n bridge provider. |
| packages/app/src/i18n/ar.ts | Adds localized strings for DebugBar focus + direction controls. |
| packages/app/src/i18n/az.ts | Adds localized strings for DebugBar focus + direction controls. |
| packages/app/src/i18n/br.ts | Adds localized strings for DebugBar focus + direction controls. |
| packages/app/src/i18n/bs.ts | Adds localized strings for DebugBar focus + direction controls. |
| packages/app/src/i18n/da.ts | Adds localized strings for DebugBar focus + direction controls. |
| packages/app/src/i18n/de.ts | Adds localized strings for DebugBar focus + direction controls. |
| packages/app/src/i18n/en.ts | Adds localized strings for DebugBar focus + direction controls. |
| packages/app/src/i18n/es.ts | Adds localized strings for DebugBar focus + direction controls. |
| packages/app/src/i18n/fi.ts | Adds localized strings for DebugBar focus + direction controls. |
| packages/app/src/i18n/fr.ts | Adds localized strings for DebugBar focus + direction controls. |
| packages/app/src/i18n/hi.ts | Adds localized strings for DebugBar focus + direction controls. |
| packages/app/src/i18n/id.ts | Adds localized strings for DebugBar focus + direction controls. |
| packages/app/src/i18n/it.ts | Adds localized strings for DebugBar focus + direction controls. |
| packages/app/src/i18n/ja.ts | Adds localized strings for DebugBar focus + direction controls. |
| packages/app/src/i18n/ko.ts | Adds localized strings for DebugBar focus + direction controls. |
| packages/app/src/i18n/nl.ts | Adds localized strings for DebugBar focus + direction controls. |
| packages/app/src/i18n/no.ts | Adds localized strings for DebugBar focus + direction controls. |
| packages/app/src/i18n/pa.ts | Adds localized strings for DebugBar focus + direction controls. |
| packages/app/src/i18n/pl.ts | Adds localized strings for DebugBar focus + direction controls. |
| packages/app/src/i18n/ru.ts | Adds localized strings for DebugBar focus + direction controls. |
| packages/app/src/i18n/sv.ts | Adds localized strings for DebugBar focus + direction controls. |
| packages/app/src/i18n/th.ts | Adds localized strings for DebugBar focus + direction controls. |
| packages/app/src/i18n/tr.ts | Adds localized strings for DebugBar focus + direction controls. |
| packages/app/src/i18n/uk.ts | Adds localized strings for DebugBar focus + direction controls. |
| packages/app/src/i18n/ur.ts | Adds localized strings for DebugBar focus + direction controls. |
| packages/app/src/i18n/vi.ts | Adds localized strings for DebugBar focus + direction controls. |
| packages/app/src/i18n/zh.ts | Adds localized strings for DebugBar focus + direction controls. |
| packages/app/src/i18n/zht.ts | Adds localized strings for DebugBar focus + direction controls. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <button | ||
| type="button" | ||
| aria-label="Force focus styles on all interactive elements" | ||
| aria-label={props.tip} |
Hona
enabled auto-merge (squash)
August 4, 2026 08:13
banlanzs
pushed a commit
to banlanzs/opencode
that referenced
this pull request
Aug 6, 2026
charlesverge
pushed a commit
to charlesverge/opencode
that referenced
this pull request
Aug 11, 2026
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.
Summary
Testing