| ... | @@ -213,6 +213,20 @@ export function NewTaskDraftScreen(props: { | ... | @@ -213,6 +213,20 @@ export function NewTaskDraftScreen(props: { |
| 213 | const controlsBottomPadding = Math.max(insets.bottom, 10); | 213 | const controlsBottomPadding = Math.max(insets.bottom, 10); |
| 214 | const keyboardOpenedOffset = Math.max(0, controlsBottomPadding - 8); | 214 | const keyboardOpenedOffset = Math.max(0, controlsBottomPadding - 8); |
| 215 | const { projectScopes, selectedProject, selectedProjectKey, setProject } = flow; | 215 | const { projectScopes, selectedProject, selectedProjectKey, setProject } = flow; |
| | 216 | // The picker and sidebar name a project by its repository scope; a workspace |
| | 217 | // inside it (e.g. apps/server) is titled by its folder, which reads as |
| | 218 | // ambiguous on its own. |
| | 219 | const selectedProjectLabel = useMemo(() => { |
| | 220 | if (!selectedProject) return null; |
| | 221 | const scope = projectScopes.find((candidate) => |
| | 222 | candidate.projectRefs.some( |
| | 223 | (ref) => |
| | 224 | ref.environmentId === selectedProject.environmentId && |
| | 225 | ref.projectId === selectedProject.id, |
| | 226 | ), |
| | 227 | ); |
| | 228 | return scope?.title ?? selectedProject.title; |
| | 229 | }, [projectScopes, selectedProject]); |
| 216 | const { connectedEnvironments } = useRemoteConnectionStatus(); | 230 | const { connectedEnvironments } = useRemoteConnectionStatus(); |
| 217 | const selectedEnvironmentServerConfig = useEnvironmentServerConfig( | 231 | const selectedEnvironmentServerConfig = useEnvironmentServerConfig( |
| 218 | selectedProject?.environmentId ?? null, | 232 | selectedProject?.environmentId ?? null, |
| ... | @@ -507,7 +521,7 @@ export function NewTaskDraftScreen(props: { | ... | @@ -507,7 +521,7 @@ export function NewTaskDraftScreen(props: { |
| 507 | }); | 521 | }); |
| 508 | const voiceInput = useVoiceInputController({ | 522 | const voiceInput = useVoiceInputController({ |
| 509 | ownerKey: flow.draftKey, | 523 | ownerKey: flow.draftKey, |
| 510 | label: selectedProject ? `New task in ${selectedProject.title}` : "New task", | 524 | label: selectedProjectLabel ? `New task in ${selectedProjectLabel}` : "New task", |
| 511 | readDraftMessage: () => (flow.draftKey ? getComposerDraftSnapshot(flow.draftKey).text : null), | 525 | readDraftMessage: () => (flow.draftKey ? getComposerDraftSnapshot(flow.draftKey).text : null), |
| 512 | subscribeToDraftChanges: (onChange) => appAtomRegistry.subscribe(composerDraftsAtom, onChange), | 526 | subscribeToDraftChanges: (onChange) => appAtomRegistry.subscribe(composerDraftsAtom, onChange), |
| 513 | selection: composerMenu.selection, | 527 | selection: composerMenu.selection, |
| ... | @@ -1562,7 +1576,7 @@ export function NewTaskDraftScreen(props: { | ... | @@ -1562,7 +1576,7 @@ export function NewTaskDraftScreen(props: { |
| 1562 | <Text className="text-2xl font-t3-medium tracking-tight text-foreground">in </Text> | 1576 | <Text className="text-2xl font-t3-medium tracking-tight text-foreground">in </Text> |
| 1563 | <Pressable | 1577 | <Pressable |
| 1564 | accessibilityHint="Opens the project picker" | 1578 | accessibilityHint="Opens the project picker" |
| 1565 | accessibilityLabel={selectedProject.title} | 1579 | accessibilityLabel={selectedProjectLabel ?? selectedProject.title} |
| 1566 | accessibilityRole="button" | 1580 | accessibilityRole="button" |
| 1567 | disabled={isComposerInteractionLocked} | 1581 | disabled={isComposerInteractionLocked} |
| 1568 | onPress={chooseProject} | 1582 | onPress={chooseProject} |
| ... | @@ -1572,7 +1586,7 @@ export function NewTaskDraftScreen(props: { | ... | @@ -1572,7 +1586,7 @@ export function NewTaskDraftScreen(props: { |
| 1572 | className="text-2xl font-t3-medium tracking-tight text-foreground" | 1586 | className="text-2xl font-t3-medium tracking-tight text-foreground" |
| 1573 | numberOfLines={1} | 1587 | numberOfLines={1} |
| 1574 | > | 1588 | > |
| 1575 | {selectedProject.title} | 1589 | {selectedProjectLabel ?? selectedProject.title} |
| 1576 | </Text> | 1590 | </Text> |
| 1577 | </Pressable> | 1591 | </Pressable> |
| 1578 | <Text className="text-2xl font-t3-medium tracking-tight text-foreground">?</Text> | 1592 | <Text className="text-2xl font-t3-medium tracking-tight text-foreground">?</Text> |
| ... | @@ -1878,7 +1892,7 @@ export function NewTaskDraftScreen(props: { | ... | @@ -1878,7 +1892,7 @@ export function NewTaskDraftScreen(props: { |
| 1878 | options={{ | 1892 | options={{ |
| 1879 | headerBackVisible: false, | 1893 | headerBackVisible: false, |
| 1880 | headerShadowVisible: false, | 1894 | headerShadowVisible: false, |
| 1881 | title: "", | 1895 | title: "New thread", |
| 1882 | }} | 1896 | }} |
| 1883 | /> | 1897 | /> |
| 1884 | <NativeHeaderToolbar placement="left"> | 1898 | <NativeHeaderToolbar placement="left"> |