@@ -82,7 +82,6 @@ import {
8282 NewTaskEnvironmentPickerRouteScreen ,
8383} from "./features/threads/NewTaskContextPickerScreens" ;
8484import {
85- ExistingThreadSettingsRouteProvider ,
8685 ExistingThreadSettingsRouteScreen ,
8786 NewTaskThreadSettingsRouteScreen ,
8887} from "./features/threads/ThreadSettingsSheet" ;
@@ -98,9 +97,9 @@ import { SettingsEnvironmentDetailRouteScreen } from "./features/settings/Settin
9897import { SettingsEnvironmentsRouteScreen } from "./features/settings/SettingsEnvironmentsRouteScreen" ;
9998import { SettingsFollowUpRouteScreen } from "./features/settings/SettingsFollowUpRouteScreen" ;
10099import {
101- SettingsEnvironmentAgentBehaviorRouteScreen ,
102100 SettingsEnvironmentMaintenanceRouteScreen ,
103- SettingsEnvironmentNewThreadsRouteScreen ,
101+ SettingsThreadsRouteScreen ,
102+ SettingsWorktreesRouteScreen ,
104103 SettingsEnvironmentSourceControlRouteScreen ,
105104} from "./features/settings/SettingsServerControlsRouteScreen" ;
106105import {
@@ -126,7 +125,7 @@ import { UsageRouteScreen } from "./features/usage/UsageRouteScreen";
126125import { SettingsAboutRouteScreen } from "./features/settings/SettingsAboutRouteScreen" ;
127126import { SettingsNotificationsRouteScreen } from "./features/settings/SettingsNotificationsRouteScreen" ;
128127import { SettingsRouteScreen } from "./features/settings/SettingsRouteScreen" ;
129- import { SettingsThreadsRouteScreen } from "./features/settings/SettingsThreadsRouteScreen " ;
128+ import { SettingsLabsRouteScreen } from "./features/settings/ThreadSettingsSections " ;
130129import { SettingsEnvironmentFilterProvider } from "./features/settings/settings-environment-filter" ;
131130import { openSettings , settingsOpenIn } from "./features/settings/settings-navigation" ;
132131import { DEFAULT_SETTINGS_PAGE } from "./features/workspace/workspace-tab-navigation" ;
@@ -150,8 +149,6 @@ import { deriveLayout } from "./lib/layout";
150149import { useNativeLayoutMetrics } from "./native/native-layout-metrics" ;
151150import { nativeHeaderScrollEdgeEffects } from "./native/StackHeader" ;
152151import { HORIZONTAL_FORM_SHEET_OPTIONS , formSheetDetents } from "./native/sheet-surface" ;
153- import { useThreadOutboxDrain } from "./state/use-thread-outbox-drain" ;
154- import { useComposerAttachmentUploadWorker } from "./state/composer-attachment-uploads" ;
155152import {
156153 selectWorkspaceDetail ,
157154 workspaceDetailRouter ,
@@ -264,25 +261,36 @@ const SETTINGS_SCREENS = {
264261 linking : "settings/environments/:environmentId" ,
265262 options : { ...SETTINGS_PAGE_OPTIONS , title : "Environment" } ,
266263 } ) ,
264+ // Old links to New threads and Agent behavior open Threads, which absorbed them.
267265 SettingsEnvironmentNewThreads : createNativeStackScreen ( {
268- screen : SettingsEnvironmentNewThreadsRouteScreen ,
266+ screen : SettingsThreadsRouteScreen ,
269267 linking : "settings/new-threads" ,
270- options : { ...SETTINGS_PAGE_OPTIONS , title : "New threads " } ,
268+ options : { ...SETTINGS_PAGE_OPTIONS , title : "Threads " } ,
271269 } ) ,
272270 SettingsEnvironmentSourceControl : createNativeStackScreen ( {
273271 screen : SettingsEnvironmentSourceControlRouteScreen ,
274272 linking : "settings/source-control" ,
275273 options : { ...SETTINGS_PAGE_OPTIONS , title : "Source control" } ,
276274 } ) ,
277275 SettingsEnvironmentAgentBehavior : createNativeStackScreen ( {
278- screen : SettingsEnvironmentAgentBehaviorRouteScreen ,
276+ screen : SettingsThreadsRouteScreen ,
279277 linking : "settings/agent-behavior" ,
280- options : { ...SETTINGS_PAGE_OPTIONS , title : "Agent behavior" } ,
278+ options : { ...SETTINGS_PAGE_OPTIONS , title : "Threads" } ,
279+ } ) ,
280+ SettingsWorktrees : createNativeStackScreen ( {
281+ screen : SettingsWorktreesRouteScreen ,
282+ linking : "settings/worktrees" ,
283+ options : { ...SETTINGS_PAGE_OPTIONS , title : "Worktrees" } ,
284+ } ) ,
285+ SettingsLabs : createNativeStackScreen ( {
286+ screen : SettingsLabsRouteScreen ,
287+ linking : "settings/labs" ,
288+ options : { ...SETTINGS_PAGE_OPTIONS , title : "Labs" } ,
281289 } ) ,
282290 SettingsProviderAccounts : createNativeStackScreen ( {
283291 screen : SettingsProviderAccountsRouteScreen ,
284292 linking : "settings/provider-accounts" ,
285- options : { ...SETTINGS_PAGE_OPTIONS , title : "Provider accounts " } ,
293+ options : { ...SETTINGS_PAGE_OPTIONS , title : "Providers " } ,
286294 } ) ,
287295 SettingsEnvironmentMaintenance : createNativeStackScreen ( {
288296 screen : SettingsEnvironmentMaintenanceRouteScreen ,
@@ -297,12 +305,12 @@ const SETTINGS_SCREENS = {
297305 SettingsThreads : createNativeStackScreen ( {
298306 screen : SettingsThreadsRouteScreen ,
299307 linking : "settings/thread-preferences" ,
300- options : { ...SETTINGS_PAGE_OPTIONS , title : "Thread behavior " } ,
308+ options : { ...SETTINGS_PAGE_OPTIONS , title : "Threads " } ,
301309 } ) ,
302310 SettingsAbout : createNativeStackScreen ( {
303311 screen : SettingsAboutRouteScreen ,
304312 linking : "settings/about" ,
305- options : { ...SETTINGS_PAGE_OPTIONS , title : "About T3 Code " } ,
313+ options : { ...SETTINGS_PAGE_OPTIONS , title : "About" } ,
306314 } ) ,
307315 SettingsEnvironmentNew : createNativeStackScreen ( {
308316 screen : ConnectionsNewRouteScreen ,
@@ -317,7 +325,7 @@ const SETTINGS_SCREENS = {
317325 linking : "settings/archive" ,
318326 options : {
319327 ...SETTINGS_PAGE_OPTIONS ,
320- title : "Archived Threads " ,
328+ title : "Archive " ,
321329 } ,
322330 } ) ,
323331 SettingsNavigation : createNativeStackScreen ( {
@@ -338,21 +346,21 @@ const SETTINGS_SCREENS = {
338346 linking : "settings/project-grouping" ,
339347 options : {
340348 ...SETTINGS_PAGE_OPTIONS ,
341- title : "Organization " ,
349+ title : "General " ,
342350 } ,
343351 } ) ,
344352 SettingsOrganization : createNativeStackScreen ( {
345353 screen : SettingsProjectGroupingRouteScreen ,
346354 linking : "settings/organization" ,
347355 options : {
348356 ...SETTINGS_PAGE_OPTIONS ,
349- title : "Organization " ,
357+ title : "General " ,
350358 } ,
351359 } ) ,
352360 SettingsProjectOverview : createNativeStackScreen ( {
353361 screen : SettingsProjectOverviewRouteScreen ,
354362 linking : "settings/project" ,
355- options : { ...SETTINGS_PAGE_OPTIONS , title : "Project overview " } ,
363+ options : { ...SETTINGS_PAGE_OPTIONS , title : "Projects " } ,
356364 } ) ,
357365 SettingsKeyboard : createNativeStackScreen ( {
358366 screen : SettingsKeyboardRouteScreen ,
@@ -375,15 +383,15 @@ const SETTINGS_SCREENS = {
375383 linking : "settings/follow-ups" ,
376384 options : {
377385 ...SETTINGS_PAGE_OPTIONS ,
378- title : "Follow-ups " ,
386+ title : "Chat " ,
379387 } ,
380388 } ) ,
381389 SettingsScheduledTasks : createNativeStackScreen ( {
382390 screen : SettingsScheduledTasksRouteScreen ,
383391 linking : "settings/scheduled-tasks" ,
384392 options : {
385393 ...SETTINGS_PAGE_OPTIONS ,
386- title : "Scheduled Tasks " ,
394+ title : "Scheduled tasks " ,
387395 headerTitleStyle : { fontSize : 16 , fontWeight : "800" } ,
388396 } ,
389397 } ) ,
@@ -486,13 +494,6 @@ function workspaceLocationFromState(state: NavigationState) {
486494 } ;
487495}
488496
489- // Isolate subscriptions so streaming updates cannot re-render RootStackLayout and every screen.
490- function ThreadOutboxDrainWorker ( ) {
491- useThreadOutboxDrain ( ) ;
492- useComposerAttachmentUploadWorker ( ) ;
493- return null ;
494- }
495-
496497function RootStackLayout ( props : {
497498 readonly children : React . ReactNode ;
498499 readonly state : NavigationState ;
@@ -510,16 +511,11 @@ function RootStackLayout(props: {
510511 ) ;
511512 const draftRoute = props . state . routes . findLast ( ( route ) => route . name === "Thread" ) ;
512513 const draftParams = (
513- draftRoute ?. params as
514- | { draft ?: { draftId ?: string | string [ ] ; pendingTaskId ?: string | string [ ] } }
515- | undefined
514+ draftRoute ?. params as { draft ?: { draftId ?: string | string [ ] } } | undefined
516515 ) ?. draft ;
517516 const routeDraftId = Array . isArray ( draftParams ?. draftId )
518517 ? draftParams . draftId [ 0 ]
519518 : draftParams ?. draftId ;
520- const routePendingTaskId = Array . isArray ( draftParams ?. pendingTaskId )
521- ? draftParams . pendingTaskId [ 0 ]
522- : draftParams ?. pendingTaskId ;
523519 useAgentNotificationNavigation ( workspaceLocation . pathname ) ;
524520 useConnectOnboardingNavigation ( ) ;
525521 useAppShortcuts ( props . state ) ;
@@ -541,29 +537,22 @@ function RootStackLayout(props: {
541537 } , [ navigation , pendingShare , props . state ] ) ;
542538
543539 return (
544- < NewTaskFlowProvider
545- active = { isDraftThreadRoute ( draftRoute ) }
546- routeDraftId = { routeDraftId }
547- routePendingTaskId = { routePendingTaskId }
548- >
540+ < NewTaskFlowProvider active = { isDraftThreadRoute ( draftRoute ) } routeDraftId = { routeDraftId } >
549541 < HardwareKeyboardCommandProvider pathname = { pathname } >
550- < ThreadOutboxDrainWorker />
551542 < ShowcaseCaptureCoordinator pathname = { pathname } />
552543 < SettingsEnvironmentFilterProvider open = { settingsOpen } >
553- < ExistingThreadSettingsRouteProvider >
554- < WorkspaceConnectionStatusProvider >
555- < AndroidWorkspaceTabsProvider state = { props . state } >
556- < AdaptiveWorkspaceLayout
557- pathname = { workspaceLocation . pathname }
558- workspaceRouteKey = { workspaceLocation . routeKey }
559- selectedPullRequestKey = { selectedPullRequestKey ( props . state ) }
560- >
561- { props . children }
562- < HardwareKeyboardCommandOverlay />
563- </ AdaptiveWorkspaceLayout >
564- </ AndroidWorkspaceTabsProvider >
565- </ WorkspaceConnectionStatusProvider >
566- </ ExistingThreadSettingsRouteProvider >
544+ < WorkspaceConnectionStatusProvider >
545+ < AndroidWorkspaceTabsProvider state = { props . state } >
546+ < AdaptiveWorkspaceLayout
547+ pathname = { workspaceLocation . pathname }
548+ workspaceRouteKey = { workspaceLocation . routeKey }
549+ selectedPullRequestKey = { selectedPullRequestKey ( props . state ) }
550+ >
551+ { props . children }
552+ < HardwareKeyboardCommandOverlay />
553+ </ AdaptiveWorkspaceLayout >
554+ </ AndroidWorkspaceTabsProvider >
555+ </ WorkspaceConnectionStatusProvider >
567556 </ SettingsEnvironmentFilterProvider >
568557 </ HardwareKeyboardCommandProvider >
569558 </ NewTaskFlowProvider >
0 commit comments