Skip to content

Commit c22d891

Browse files
fix(mobile): Settings keeps its scope filter on every iOS, and Android keeps one search
- Without Liquid Glass, Settings shows its search field instead of a trailing search button, which replaced the scope filter. - Android Settings keeps the section toolbar; its list has its own search. - The brand title announces Settings while Settings is open. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent bd08182 commit c22d891

2 files changed

Lines changed: 15 additions & 9 deletions

File tree

‎apps/mobile/src/features/workspace/WorkspaceRootScreen.tsx‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,17 @@ function WorkspaceRootTitle(props: {
5454
readonly maxWidth: number;
5555
readonly onOpenEnvironments: () => void;
5656
}) {
57-
const { state } = useWorkspaceTabs()!;
57+
const { state, settingsOpen } = useWorkspaceTabs()!;
5858
const enabled = useEnabledNavigationTabs();
59+
const tabTitle = settingsOpen
60+
? "Settings"
61+
: enabled.length
62+
? TAB_TITLES[state.selectedTab]
63+
: "Navigation";
5964
return (
6065
<View style={{ width: props.maxWidth, minHeight: 32, justifyContent: "center" }}>
6166
<WorkspaceConnectionTitle
62-
brand={
63-
<CompactBrandTitle
64-
accessibilityLabel={`T3 Code, ${enabled.length ? TAB_TITLES[state.selectedTab] : "Navigation"}`}
65-
/>
66-
}
67+
brand={<CompactBrandTitle accessibilityLabel={`T3 Code, ${tabTitle}`} />}
6768
maxWidth={props.maxWidth}
6869
onPress={props.onOpenEnvironments}
6970
/>
@@ -217,7 +218,7 @@ function WorkspaceRootContent() {
217218
{deviceType !== "pad" && deviceType !== "phone" && sidebarPicker ? (
218219
<WorkspaceSidebarTabs />
219220
) : null}
220-
{enabled.length === 0 && !settingsOpen ? null : settingsOpen ||
221+
{enabled.length === 0 && !settingsOpen ? null : (settingsOpen && Platform.OS === "ios") || // Android's Settings list carries its own search in its app bar.
221222
state.selectedTab === "threads" ||
222223
state.selectedTab === "pullRequests" ? (
223224
<WorkspaceToolbar sidebar={sidebarNavigation} onNewTask={startNewTask} />

‎apps/mobile/src/features/workspace/WorkspaceToolbar.ios.tsx‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,13 @@ export function WorkspaceToolbar(props: {
149149
optionsVersion={[selectedTab, tab.searchMode]}
150150
listeners={{ transitionEnd: restoreSearch }}
151151
options={{
152+
// Without Liquid Glass, Settings keeps its search field out instead of a search button,
153+
// which would take the header's trailing items from the scope filter.
152154
headerSearchBarOptions:
153-
(NATIVE_LIQUID_GLASS_SUPPORTED || tab.searchMode !== "resting") && searchVisible
155+
(NATIVE_LIQUID_GLASS_SUPPORTED ||
156+
tab.searchMode !== "resting" ||
157+
workspace.settingsOpen) &&
158+
searchVisible
154159
? {
155160
ref: searchRef,
156161
autoFocus: tab.searchMode === "active",
@@ -185,7 +190,7 @@ export function WorkspaceToolbar(props: {
185190
/>
186191
{/* UIKit lays trailing items out from the edge inward. A trailing toolbar replaces the
187192
header's own items, so an empty one would hide the Settings scope filter. */}
188-
{workspace.settingsOpen && !foldedSearch && NATIVE_LIQUID_GLASS_SUPPORTED ? null : (
193+
{workspace.settingsOpen && !foldedSearch ? null : (
189194
<Toolbar placement="right">
190195
{searchButton}
191196
{nativeToolbarCompose && foldedSearch ? <Toolbar.Spacer width={8} /> : null}

0 commit comments

Comments
 (0)