GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Merge branch 'main' into fix/copy-in-terminal · pingdotgg/t3code@7a0d12c

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps
    • mobile
      • modules/t3-composer-editor
        • android/src/main/java/expo/modules/t3composereditor
          • T3ComposerEditorView.kt
        • ios
          • T3ComposerEditorView.swift
      • src
        • features
          • agent-awareness
            • remoteRegistration.test.ts
            • remoteRegistration.ts
          • files
            • FileTreeBrowser.tsx
          • home
            • HomeRouteScreen.tsx
          • review
            • ReviewSheet.tsx
          • settings
            • SettingsRouteScreen.tsx
          • threads
            • GitActionProgressOverlay.tsx
            • NewTaskDraftScreen.tsx
            • ThreadComposer.tsx
            • ThreadDetailScreen.tsx
            • ThreadFeed.tsx
            • ThreadRouteScreen.tsx
          • updates
            • app-updates.test.ts
            • app-updates.ts
        • lib
          • atomic-file.ts
          • composerImages.ts
          • foreground-handoff.test.ts
          • foreground-handoff.ts
          • layoutMetrics.ts
        • native
          • T3ComposerEditor.ios.tsx
          • T3ComposerEditor.native.tsx
          • composerEditorRevision.test.ts
          • composerEditorRevision.ts
        • state
          • thread-outbox-model.ts
          • thread-outbox-storage.ts
          • thread-outbox.test.ts
          • thread-outbox.ts
          • use-composer-drafts.test.ts
          • use-composer-drafts.ts
          • use-thread-composer-state.ts
          • use-thread-outbox-drain.ts
    • server/src
      • cli
        • connect.ts
      • cloud
        • config.ts
      • environment
        • ServerEnvironment.test.ts
        • ServerEnvironment.ts
      • relay
        • AgentAwarenessRelay.ts
    • web/src
      • components
        • AppSidebarLayout.tsx
        • ChatView.tsx
        • RightPanelTabs.tsx
        • Sidebar.tsx
        • chat
          • ChatHeader.tsx
          • PanelLayoutControls.tsx
        • sidebar
          • DesktopUpdateStatusIcon.tsx
          • SidebarUpdatePill.tsx
      • routes
        • _chat.pull-requests.tsx
  • docs/user
    • updating.md
  • packages/contracts/src
    • environment.ts

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/mobile/modules/t3-composer-editor/android/src/main/java/expo/modules/t3composereditor/T3ComposerEditorView.kt‎

Copy file name to clipboardExpand all lines: apps/mobile/modules/t3-composer-editor/android/src/main/java/expo/modules/t3composereditor/T3ComposerEditorView.kt
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,9 @@ class T3ComposerEditorView(context: Context, appContext: AppContext) : ExpoView(
252252
val textLength = editor.text?.length ?: 0
253253
val safeStart = start.coerceIn(0, textLength)
254254
val safeEnd = end.coerceIn(0, textLength)
255+
// Re-applying an unchanged selection resets the keyboard's suggestion
256+
// state, so a no-op assignment must be skipped.
257+
if (editor.selectionStart == safeStart && editor.selectionEnd == safeEnd) return
255258
editor.setSelection(safeStart, safeEnd)
256259
}
257260

@@ -281,6 +284,10 @@ class T3ComposerEditorView(context: Context, appContext: AppContext) : ExpoView(
281284
)
282285

283286
private fun emitSelectionChange(start: Int, end: Int) {
287+
// Caret moves advance the revision counter like text edits do: a
288+
// controlled payload computed before this move is stale and must fail the
289+
// revision guard instead of yanking the caret back mid-typing.
290+
nativeEventCount += 1
284291
onComposerSelectionChange(
285292
mapOf(
286293
"value" to editor.text.toString(),
Collapse file

‎apps/mobile/modules/t3-composer-editor/ios/T3ComposerEditorView.swift‎

Copy file name to clipboardExpand all lines: apps/mobile/modules/t3-composer-editor/ios/T3ComposerEditorView.swift
+17-1Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,12 @@ public final class T3ComposerEditorView: ExpoView, UITextViewDelegate, UITextDro
489489
return
490490
}
491491
restoreBaseTypingAttributes()
492+
// UIKit moves the selection before textViewDidChange runs. Emitting here
493+
// would pair the post-edit text with a pre-edit revision counter, so let
494+
// the change event that follows carry both; only pure caret moves emit.
495+
guard self.textView.serializedText() == value else {
496+
return
497+
}
492498
emitSelection()
493499
}
494500

@@ -774,8 +780,12 @@ public final class T3ComposerEditorView: ExpoView, UITextViewDelegate, UITextDro
774780
}
775781

776782
private func emitSelection() {
783+
// Caret moves advance the revision counter like text edits do: a
784+
// controlled payload computed before this move is stale and must fail the
785+
// revision guard instead of yanking the caret back mid-typing.
777786
let currentValue = textView.serializedText()
778787
let selection = sourceSelection()
788+
nativeEventCount += 1
779789
onComposerSelectionChange([
780790
"value": currentValue,
781791
"selection": ["start": selection.start, "end": selection.end],
@@ -817,10 +827,16 @@ public final class T3ComposerEditorView: ExpoView, UITextViewDelegate, UITextDro
817827
NSMaxRange(nextRange) <= textView.attributedText.length else {
818828
return
819829
}
830+
self.requestedSelection = nil
831+
// Programmatically assigning selectedRange resets the keyboard's
832+
// autocorrect and predictive-text context even when the range is
833+
// unchanged, so a no-op assignment must be skipped.
834+
guard !NSEqualRanges(nextRange, textView.selectedRange) else {
835+
return
836+
}
820837
isApplyingControlledValue = true
821838
textView.selectedRange = nextRange
822839
isApplyingControlledValue = false
823-
self.requestedSelection = nil
824840
}
825841

826842
private func updatePlaceholderVisibility() {
Collapse file

‎apps/mobile/src/features/agent-awareness/remoteRegistration.test.ts‎

Copy file name to clipboardExpand all lines: apps/mobile/src/features/agent-awareness/remoteRegistration.test.ts
+76Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,15 @@ import {
2020
clearAgentAwarenessRegistrationRecord,
2121
loadAgentAwarenessRegistrationRecord,
2222
loadOrCreateAgentAwarenessDeviceId,
23+
loadPreferences,
2324
saveAgentAwarenessRegistrationRecord,
2425
} from "../../persistence/imperative";
26+
import type { Preferences } from "../../persistence/mobile-preferences";
2527
import { makeRelayDeviceRegistrationRequest, resolveApsEnvironment } from "./registrationPayload";
2628
import {
2729
AgentAwarenessOperationError,
2830
__resetAgentAwarenessRemoteRegistrationForTest,
31+
armAgentAwarenessLiveActivityForLocalWork,
2932
getAgentAwarenessRegistrationStatus,
3033
mergeAgentAwarenessRegistrationPreferences,
3134
refreshActiveLiveActivityRemoteRegistration,
@@ -43,6 +46,13 @@ import * as Notifications from "expo-notifications";
4346
const secureStore = vi.hoisted(() => new Map<string, string>());
4447
const widgetMocks = vi.hoisted(() => ({
4548
getInstances: vi.fn(() => []),
49+
start: vi.fn(() => ({})),
50+
}));
51+
const environmentConfigsMock = vi.hoisted(() => ({
52+
configs: new Map<
53+
string,
54+
{ environment: { capabilities: { agentActivityPublishing?: boolean } } }
55+
>(),
4656
}));
4757
const backgroundRuntime = vi.hoisted(() => ({
4858
pending: [] as Array<{
@@ -77,9 +87,22 @@ vi.mock("expo-widgets", () => ({
7787
vi.mock("../../widgets/AgentActivity", () => ({
7888
default: {
7989
getInstances: widgetMocks.getInstances,
90+
start: widgetMocks.start,
8091
},
8192
}));
8293

94+
// The state modules pull the whole connection stack (and native expo modules)
95+
// into the import graph; the arming gate only needs the configs map.
96+
vi.mock("../../state/atom-registry", () => ({
97+
appAtomRegistry: {
98+
get: () => environmentConfigsMock.configs,
99+
},
100+
}));
101+
102+
vi.mock("../../state/server", () => ({
103+
environmentServerConfigsAtom: Symbol("environmentServerConfigsAtom"),
104+
}));
105+
83106
vi.mock("expo-notifications", () => ({
84107
addPushTokenListener: vi.fn(() => ({ remove: vi.fn() })),
85108
getDevicePushTokenAsync: vi.fn(() => Promise.resolve({ type: "ios", data: "apns-token" })),
@@ -227,6 +250,8 @@ describe("makeRelayDeviceRegistrationRequest", () => {
227250
vi.mocked(loadOrCreateAgentAwarenessDeviceId).mockResolvedValue("device-1");
228251
widgetMocks.getInstances.mockReset();
229252
widgetMocks.getInstances.mockReturnValue([]);
253+
widgetMocks.start.mockClear();
254+
environmentConfigsMock.configs.clear();
230255
});
231256

232257
it("preserves disabled Live Activity preferences in relay registrations", () => {
@@ -856,4 +881,55 @@ describe("makeRelayDeviceRegistrationRequest", () => {
856881
}).pipe(Effect.provide(relayTestLayer));
857882
},
858883
);
884+
885+
it("skips the Live Activity seed when the environment reports publishing disabled", async () => {
886+
setAgentAwarenessRelayTokenProvider(() => Promise.resolve("clerk-token-user-a"));
887+
vi.mocked(loadPreferences).mockResolvedValueOnce({
888+
liveActivitiesEnabled: true,
889+
} as Preferences);
890+
environmentConfigsMock.configs.set("env-1", {
891+
environment: { capabilities: { agentActivityPublishing: false } },
892+
});
893+
894+
armAgentAwarenessLiveActivityForLocalWork({
895+
environmentId: "env-1" as EnvironmentId,
896+
threadTitle: "Fix the flaky test",
897+
projectTitle: "t3code",
898+
});
899+
await new Promise((resolve) => setTimeout(resolve, 0));
900+
901+
expect(widgetMocks.start).not.toHaveBeenCalled();
902+
});
903+
904+
it("seeds the Live Activity for publishing and pre-capability environments", async () => {
905+
setAgentAwarenessRelayTokenProvider(() => Promise.resolve("clerk-token-user-a"));
906+
environmentConfigsMock.configs.set("env-publishing", {
907+
environment: { capabilities: { agentActivityPublishing: true } },
908+
});
909+
910+
vi.mocked(loadPreferences).mockResolvedValueOnce({
911+
liveActivitiesEnabled: true,
912+
} as Preferences);
913+
armAgentAwarenessLiveActivityForLocalWork({
914+
environmentId: "env-publishing" as EnvironmentId,
915+
threadTitle: "Fix the flaky test",
916+
projectTitle: "t3code",
917+
});
918+
await new Promise((resolve) => setTimeout(resolve, 0));
919+
expect(widgetMocks.start).toHaveBeenCalledTimes(1);
920+
921+
// An environment without the capability may run an older server that
922+
// still publishes; only an explicit false skips the seed.
923+
widgetMocks.start.mockClear();
924+
vi.mocked(loadPreferences).mockResolvedValueOnce({
925+
liveActivitiesEnabled: true,
926+
} as Preferences);
927+
armAgentAwarenessLiveActivityForLocalWork({
928+
environmentId: "env-pre-capability" as EnvironmentId,
929+
threadTitle: "Fix the flaky test",
930+
projectTitle: "t3code",
931+
});
932+
await new Promise((resolve) => setTimeout(resolve, 0));
933+
expect(widgetMocks.start).toHaveBeenCalledTimes(1);
934+
});
859935
});
Collapse file

‎apps/mobile/src/features/agent-awareness/remoteRegistration.ts‎

Copy file name to clipboardExpand all lines: apps/mobile/src/features/agent-awareness/remoteRegistration.ts
+23-1Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ import {
2020

2121
import type { SavedRemoteConnection } from "../../lib/connection";
2222
import { runtime } from "../../lib/runtime";
23+
import { appAtomRegistry } from "../../state/atom-registry";
24+
import { environmentServerConfigsAtom } from "../../state/server";
2325
import type { Preferences } from "../../persistence/mobile-preferences";
2426
import {
2527
clearAgentAwarenessRegistrationRecord,
@@ -448,18 +450,38 @@ function unregisterDeviceWithRelay(input: {
448450
});
449451
}
450452

453+
// The environment descriptor advertises whether agent-activity publishes
454+
// currently leave that server (`capabilities.agentActivityPublishing`). Only
455+
// an explicit false skips the seed card: older servers omit the capability
456+
// but may still publish.
457+
function environmentPublishesAgentActivity(environmentId: EnvironmentId): boolean {
458+
return (
459+
appAtomRegistry.get(environmentServerConfigsAtom).get(environmentId)?.environment.capabilities
460+
.agentActivityPublishing !== false
461+
);
462+
}
463+
451464
// Arms the lock-screen card the moment the user starts agent work from this
452465
// phone, while the app is still foregrounded and the fresh activity's token
453466
// can be registered immediately. The seeded row is a best-effort placeholder;
454467
// the relay's registration replay repaints it with the authoritative
455-
// aggregate within seconds. No-ops when a card is already armed.
468+
// aggregate within seconds. No-ops when a card is already armed, and skips
469+
// environments that report publishing disabled — the seed would sit on
470+
// "Connecting" forever with no update ever arriving to repaint or end it.
456471
export function armAgentAwarenessLiveActivityForLocalWork(input: {
472+
readonly environmentId: EnvironmentId;
457473
readonly threadTitle: string;
458474
readonly projectTitle: string;
459475
}): void {
460476
if (!canRegisterRemoteLiveActivities() || !relayTokenProvider) {
461477
return;
462478
}
479+
if (!environmentPublishesAgentActivity(input.environmentId)) {
480+
logRegistrationDebug("live activity arming skipped; environment does not publish", {
481+
environmentId: input.environmentId,
482+
});
483+
return;
484+
}
463485
void loadPreferences()
464486
.catch(() => null)
465487
.then((preferences) => {
Collapse file

‎apps/mobile/src/features/files/FileTreeBrowser.tsx‎

Copy file name to clipboardExpand all lines: apps/mobile/src/features/files/FileTreeBrowser.tsx
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { AppText as Text } from "../../components/AppText";
88
import { PierreEntryIcon } from "../../components/PierreEntryIcon";
99
import { cn } from "../../lib/cn";
1010
import { useThemeColor } from "../../lib/useThemeColor";
11+
import { IOS_NAV_BAR_HEIGHT } from "../../lib/layoutMetrics";
1112
import { NATIVE_LIQUID_GLASS_SUPPORTED } from "../../native/native-glass";
1213
import {
1314
buildFileTree,
@@ -123,7 +124,7 @@ export function FileTreeBrowser(props: {
123124
const insets = useSafeAreaInsets();
124125
// Native transparent-header height ≈ safe-area top + nav bar (~44). Matches the
125126
// observed adjustedContentInset bottom (~102) seen in the native trace.
126-
const headerInset = NATIVE_LIQUID_GLASS_SUPPORTED ? insets.top + 44 : 0;
127+
const headerInset = NATIVE_LIQUID_GLASS_SUPPORTED ? insets.top + IOS_NAV_BAR_HEIGHT : 0;
127128
const iconColor = String(useThemeColor("--color-icon-muted"));
128129
const { onPreviewFile, onSelectFile, selectedPath: controlledSelectedPath } = props;
129130
const controlledSelectedPathRef = useRef(controlledSelectedPath);
Collapse file

‎apps/mobile/src/features/home/HomeRouteScreen.tsx‎

Copy file name to clipboardExpand all lines: apps/mobile/src/features/home/HomeRouteScreen.tsx
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { useSavedRemoteConnections } from "../../state/use-remote-environment-re
1111
import { useAdaptiveWorkspaceLayout } from "../layout/AdaptiveWorkspaceLayout";
1212
import { WorkspaceEmptyDetail } from "../layout/WorkspaceEmptyDetail";
1313
import { WorkspaceSidebarToolbar } from "../layout/workspace-sidebar-toolbar";
14-
import { checkForAppUpdateOnLaunch } from "../updates/app-updates";
14+
import { checkForAppUpdateOnLaunch, startAppUpdateForegroundRecheck } from "../updates/app-updates";
1515
import { AndroidHomeFabLayout } from "./AndroidHomeFab";
1616
import { HomeScreen } from "./HomeScreen";
1717
import { HomeHeader } from "./HomeHeader";
@@ -34,6 +34,7 @@ export function HomeRouteScreen() {
3434

3535
useEffect(() => {
3636
void checkForAppUpdateOnLaunch();
37+
startAppUpdateForegroundRecheck();
3738
}, []);
3839

3940
const {
Collapse file

‎apps/mobile/src/features/review/ReviewSheet.tsx‎

Copy file name to clipboardExpand all lines: apps/mobile/src/features/review/ReviewSheet.tsx
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import { environmentCatalog } from "../../connection/catalog";
3939
import { useEnvironmentPresentation } from "../../state/presentation";
4040
import { useAtomCommand } from "../../state/use-atom-command";
4141
import { useThemeColor } from "../../lib/useThemeColor";
42+
import { IOS_NAV_BAR_HEIGHT } from "../../lib/layoutMetrics";
4243
import { useThreadDraftForThread } from "../../state/use-thread-composer-state";
4344
import { EnvironmentConnectionNotice } from "../connection/EnvironmentConnectionNotice";
4445
import {
@@ -277,9 +278,11 @@ function ReviewFileNavigator({
277278
// The nested native header is translucent; start the list below it so
278279
// the scroll-edge effect can sample the content (same treatment as
279280
// FileTreeBrowser in the Files pane).
280-
paddingTop: Platform.OS === "ios" ? insets.top + 44 + 8 : 8,
281+
paddingTop: Platform.OS === "ios" ? insets.top + IOS_NAV_BAR_HEIGHT + 8 : 8,
281282
}}
282-
scrollIndicatorInsets={Platform.OS === "ios" ? { top: insets.top + 44 } : undefined}
283+
scrollIndicatorInsets={
284+
Platform.OS === "ios" ? { top: insets.top + IOS_NAV_BAR_HEIGHT } : undefined
285+
}
283286
renderItem={renderFile}
284287
/>
285288
);
Collapse file

‎apps/mobile/src/features/settings/SettingsRouteScreen.tsx‎

Copy file name to clipboardExpand all lines: apps/mobile/src/features/settings/SettingsRouteScreen.tsx
+12-5Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,10 @@ function AppSettingsSection() {
608608
if (updateInFlight.current) return;
609609
updateInFlight.current = true;
610610
try {
611+
// The user asked for this restart by tapping the version row, so it may
612+
// apply immediately instead of prompting.
611613
await runAppUpdateCheck({
614+
applyMode: "immediate",
612615
onFailure: (message) => Alert.alert("Update failed", message),
613616
onStateChange: setUpdateState,
614617
});
@@ -631,11 +634,15 @@ function AppSettingsSection() {
631634
? "Checking…"
632635
: updateState === "downloading"
633636
? "Downloading…"
634-
: updateState === "restarting"
635-
? "Restarting…"
636-
: updateState === "current"
637-
? "Up to date"
638-
: null;
637+
: // "ready" appears only when this check joined an in-flight background-mode
638+
// check; that download installs at the next backgrounding.
639+
updateState === "ready"
640+
? "Update ready"
641+
: updateState === "restarting"
642+
? "Restarting…"
643+
: updateState === "current"
644+
? "Up to date"
645+
: null;
639646

640647
const versionRow = (
641648
<View className="flex-row items-center gap-4 p-4">
Collapse file

‎apps/mobile/src/features/threads/GitActionProgressOverlay.tsx‎

Copy file name to clipboardExpand all lines: apps/mobile/src/features/threads/GitActionProgressOverlay.tsx
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ import Animated, { FadeIn, FadeOut, LinearTransition } from "react-native-reanim
77
import { useSafeAreaInsets } from "react-native-safe-area-context";
88

99
import { AppText as Text } from "../../components/AppText";
10+
import { APP_BAR_HEIGHT } from "../../lib/layoutMetrics";
1011
import { tryOpenExternalUrl } from "../../lib/openExternalUrl";
1112
import { useThemeColor } from "../../lib/useThemeColor";
1213
import type { GitActionProgress } from "../../state/use-vcs-action-state";
1314

1415
const OVERLAY_LAYOUT_TRANSITION = LinearTransition.duration(220);
16+
const OVERLAY_TOP_GAP = 8;
1517
const AnimatedLiquidGlassView = Animated.createAnimatedComponent(LiquidGlassView);
1618

1719
export function GitActionProgressOverlay(props: {
@@ -52,7 +54,7 @@ export function GitActionProgressOverlay(props: {
5254
entering={isLiquidGlassSupported ? undefined : FadeIn.duration(200)}
5355
exiting={FadeOut.duration(150)}
5456
className="absolute inset-x-3 z-[100]"
55-
style={{ top: insets.top + 48 }}
57+
style={{ top: insets.top + APP_BAR_HEIGHT + OVERLAY_TOP_GAP }}
5658
pointerEvents="box-none"
5759
>
5860
<Pressable onPress={handlePress}>
Collapse file

‎apps/mobile/src/features/threads/NewTaskDraftScreen.tsx‎

Copy file name to clipboardExpand all lines: apps/mobile/src/features/threads/NewTaskDraftScreen.tsx
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,7 @@ export function NewTaskDraftScreen(props: {
709709
// -only Activity start. If creation fails, the token registration's replay
710710
// finds no work and ends the card within seconds.
711711
armAgentAwarenessLiveActivityForLocalWork({
712+
environmentId: selectedProject.environmentId,
712713
threadTitle: deriveThreadTitleFromPrompt(initialMessageText),
713714
projectTitle: selectedProject.title,
714715
});

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.