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 — fix(mobile): keep Live Activity status aligned with the inbox by jakeleventhal · Pull Request #26261 · pingdotgg/t3code

fix(mobile): keep Live Activity status aligned with the inbox #26261

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jakeleventhal wants to merge 21 commits into pingdotgg:main
base: main
Loading
Loading
from jakeleventhal:fix/live-activity-desktop-parity-upstream
+2,151 −328
Open

fix(mobile): keep Live Activity status aligned with the inbox #26261

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
2e3a6eb
fix(mobile): keep Live Activity status aligned with the inbox
jakeleventhal Oct 28, 2026
25ad42e
fix(mobile): handle replay races and terminal activity headers
jakeleventhal Oct 28, 2026
56552f5
fix(mobile): preserve pending activity and off-card alerts
jakeleventhal Oct 28, 2026
89473ad
fix(mobile): preserve approval alerts during off-card updates
jakeleventhal Oct 28, 2026
4be6296
fix(mobile): acknowledge replayed threads without consuming other alerts
jakeleventhal Oct 28, 2026
cb5649b
test(mobile): suppress alerts in retained activity lifecycle case
jakeleventhal Oct 28, 2026
b408f9d
fix(mobile): retain unacknowledged snooze wakes in agent activity
jakeleventhal Oct 28, 2026
8df653b
fix(mobile): let read timestamps shrink on narrow activity cards
jakeleventhal Oct 28, 2026
de60a08
fix(mobile): link activity to the first visible attention row
jakeleventhal Oct 28, 2026
be2bcc0
test(mobile): cover minimal activity glyph for snooze wakes
jakeleventhal Oct 28, 2026
a2c48bd
merge: bring main into live activity parity
maria-rcks Oct 31, 2026
ae56092
fix(relay): preserve live activity transitions during replay
maria-rcks Oct 31, 2026
7619036
fix(web): acknowledge snooze wakes when viewing threads
maria-rcks Nov 1, 2026
1dce965
merge: bring main into live activity parity
juliusmarminge Nov 11, 2026
dd538b2
fix(mobile): finish Live Activity parity on current main
juliusmarminge Nov 11, 2026
5a217cd
fix(relay): keep Android Live Updates compatible and bound retained rows
juliusmarminge Nov 11, 2026
ddcde3e
fix(relay): end iOS cards on read and narrow startup result replays
juliusmarminge Nov 11, 2026
33bfa96
Merge remote-tracking branch 'origin/main' into fix/live-activity-des…
juliusmarminge Nov 11, 2026
9c3f19d
fix(server): catch up results finished since startup after publishing…
juliusmarminge Nov 12, 2026
f6b3dba
fix(relay): match inbox snoozes, keep Android results, alert settled …
juliusmarminge Nov 12, 2026
cc1757b
fix(relay): keep settled live work, group off-card results, catch up …
juliusmarminge Nov 12, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
Next Next commit
fix(relay): end iOS cards on read and narrow startup result replays
- The freshly armed grace now covers only registration replays. A
  per-thread replay carries a real change such as reading the last
  result, so it ends the Live Activity instead of being dropped.
- Startup and relink catch-up replay a finished thread only when its
  result is unread and inside the relay's 24 hour retention, instead of
  every unsettled completion.

AI-assisted; verified with the tests and tools listed above.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge @claude
juliusmarminge and claude committed Nov 11, 2026
commit ddcde3e81d97334d80ecbf0ec495b130657fb909

Some comments aren't visible on the classic Files Changed page.

There are no files selected for viewing

21 changes: 19 additions & 2 deletions 21 apps/server/src/relay/AgentAwarenessRelay.test.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ describe("startup agent activity", () => {
},
);

it("publishes active work and older unsettled completions after startup", () => {
it("publishes active work and only unread results inside the retention window", () => {
const startedAt = DateTime.toEpochMillis(DateTime.makeUnsafe(NOW));
const oldCompleted = ThreadId.make("old-completed");
const newCompleted = ThreadId.make("new-completed");
Expand Down Expand Up @@ -193,11 +193,28 @@ describe("startup agent activity", () => {
status: "failed",
latestRunCompletedAt: DateTime.makeUnsafe("2026-09-04T12:00:01.000Z"),
}),
shell({
id: ThreadId.make("expired-failed"),
status: "failed",
latestRunCompletedAt: DateTime.makeUnsafe("2026-09-03T11:59:00.000Z"),
}),
shell({
id: ThreadId.make("unread-completed"),
status: "completed",
latestRunCompletedAt: DateTime.makeUnsafe("2026-09-04T11:59:00.000Z"),
lastVisitedAt: DateTime.makeUnsafe("2026-09-04T11:00:00.000Z"),
}),
shell({ id: ThreadId.make("idle"), status: "idle" }),
shell({ id: ThreadId.make("missing-project"), projectId: ProjectId.make("missing") }),
],
});
assert.deepStrictEqual(ids, [THREAD_ID, oldCompleted, newCompleted, oldFailed, newFailed]);
// Completions never visited count as read; failures stay unread until visited.
assert.deepStrictEqual(ids, [
THREAD_ID,
oldFailed,
newFailed,
ThreadId.make("unread-completed"),
]);
});
});

Expand Down
13 changes: 12 additions & 1 deletion 13 apps/server/src/relay/AgentAwarenessRelay.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,9 @@ function terminalWorkSinceStart(thread: AgentAwarenessThread, startedAt: number)
);
}

// Matches the relay's retention of unread results; older rows would be dropped on arrival.
const RETAINED_RESULT_REPLAY_WINDOW_MS = 24 * 60 * 60 * 1_000;

export function resolveAgentAwarenessRelayActiveThreadIds(input: {
readonly environmentId: EnvironmentId;
readonly now: number;
Expand All @@ -395,7 +398,15 @@ export function resolveAgentAwarenessRelayActiveThreadIds(input: {
thread,
now: input.now,
});
return state !== null;
if (state === null) return false;
if (state.phase !== "completed" && state.phase !== "failed") return true;
// Catch-up runs on every restart and relink, so replay only results the phone still shows.
return (
state.unread === true &&
thread.latestRunCompletedAt != null &&
input.now - DateTime.toEpochMillis(thread.latestRunCompletedAt) <=
RETAINED_RESULT_REPLAY_WINDOW_MS
);
})
.map((thread) => thread.id);
}
Expand Down
25 changes: 20 additions & 5 deletions 25 infra/relay/src/agentActivity/ApnsDeliveries.test.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -1134,9 +1134,14 @@ describe("fast completion delivery", () => {
},
);

it.effect.each([true, false])(
"preserves a freshly armed token only for a replayed read snapshot: replay=%s",
(replay) => {
it.effect.each([
{ replay: true, replayThread: false, ends: false },
{ replay: false, replayThread: false, ends: true },
// A thread replay is a real read of an already announced result.
{ replay: true, replayThread: true, ends: true },
])(
"preserves a freshly armed token only for a registration replay: %o",
({ replay, replayThread, ends }) => {
const queuedJobs: SignedApnsDeliveryJob[] = [];
const read = {
...aggregate,
Expand All @@ -1147,8 +1152,18 @@ describe("fast completion delivery", () => {
};
return Effect.gen(function* () {
const deliveries = yield* ApnsDeliveries.ApnsDeliveries;
yield* deliveries.sendForTarget({ target, aggregate: read, nowMs: 0, replay });
expect(queuedJobs).toHaveLength(replay ? 0 : 1);
yield* deliveries.sendForTarget({
target,
aggregate: read,
nowMs: 0,
replay,
...(replayThread
? { replayThread: { environmentId: state.environmentId, threadId: state.threadId } }
: {}),
});
expect(queuedJobs.map((job) => job.payload.kind)).toEqual(
ends ? ["live_activity_end"] : [],
);
}).pipe(Effect.provide(layerFor({ attempts: [], queuedJobs })));
},
);
Expand Down
6 changes: 5 additions & 1 deletion 6 infra/relay/src/agentActivity/ApnsDeliveries.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ function chooseLiveActivityDelivery(input: {
readonly aggregate: RelayAgentActivityAggregateState | null;
readonly nowMs: number;
readonly replay?: boolean;
readonly threadReplay?: boolean;
}): ChosenLiveActivityDelivery | "suppressed" | null {
const preferences = parsePreferences(input.target.preferences_json);
if (preferences?.liveActivitiesEnabled === false) {
Expand All @@ -245,8 +246,9 @@ function chooseLiveActivityDelivery(input: {
: DateTime.make(input.target.remote_started_at),
{ onNone: () => null, onSome: (dt) => dt.epochMilliseconds },
);
// Per-thread replays carry real changes such as a read result, so only registration replays wait.
if (
(input.aggregate === null || input.replay) &&
(input.aggregate === null || (input.replay && !input.threadReplay)) &&
armedAtMs !== null &&
input.nowMs - armedAtMs < FRESHLY_ARMED_GRACE_MS
) {
Expand Down Expand Up @@ -294,6 +296,7 @@ function chooseDelivery(input: {
readonly aggregate: RelayAgentActivityAggregateState | null;
readonly nowMs: number;
readonly replay?: boolean;
readonly threadReplay?: boolean;
}): ChosenDelivery | null {
const liveActivityDelivery = chooseLiveActivityDelivery(input);
if (liveActivityDelivery === "suppressed") {
Expand Down Expand Up @@ -1074,6 +1077,7 @@ const make = Effect.gen(function* () {
aggregate: input.aggregate,
nowMs: input.nowMs,
replay: input.replay ?? false,
threadReplay: input.replayThread !== undefined,
});
if (!delivery) {
return null;
Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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.
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.