Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
276 commits
Select commit Hold shift + click to select a range
a3ca98c
fix(server): drop what a plugin registered before its activation failed
github-actions[bot] Oct 6, 2026
1829ea3
fix(server): exit a plugin child on a corrupt IPC line and cover its …
github-actions[bot] Oct 7, 2026
c59bd7e
fix(server): hold a plugin's partial IPC line in one growing buffer
github-actions[bot] Oct 7, 2026
d563b47
fix(server): hold plugin calls made during startup until enabled plug…
github-actions[bot] Oct 7, 2026
5b1946f
fix(server): count a plugin IPC line's newline against the read budget
github-actions[bot] Oct 7, 2026
d11ac2c
fix(server): restore enabled plugins before any management step at st…
github-actions[bot] Oct 10, 2026
9ffc0ea
fix(server): let calls waiting on a plugin start hear how it ended
github-actions[bot] Oct 10, 2026
7c900a8
fix(server): refuse a plugin file swapped for a FIFO while digesting
github-actions[bot] Oct 10, 2026
4122e0d
chore(server): say why plugin host modules import Node builtins
github-actions[bot] Oct 10, 2026
04704fb
fix(server): answer a plugin call cancelled before its handler started
github-actions[bot] Oct 10, 2026
7a956a0
test(server): start the cooperative handler before timing it out
github-actions[bot] Oct 10, 2026
14d57ad
test(server): answer a replayed request only once its card is projected
github-actions[bot] Oct 10, 2026
8c823b3
fix(server): close a dead plugin's stderr that a process it started h…
github-actions[bot] Oct 10, 2026
5da52d5
feat(server): deliver finished runs to plugins from an acknowledged c…
github-actions[bot] Oct 4, 2026
914b34e
refactor(server): build the plugin RPC handlers in their own layer
github-actions[bot] Oct 11, 2026
1a02508
fix(server): let a run's queued checkpoint capture decide its finaliz…
github-actions[bot] Oct 6, 2026
b82a25b
fix(server): refuse the events capability without the proposed API op…
github-actions[bot] Oct 6, 2026
2e20f0a
fix(server): drop a plugin's event handlers when its activation fails
github-actions[bot] Oct 7, 2026
6f11331
test(server): cover finalization of a run stopped through the ownersh…
github-actions[bot] Oct 7, 2026
0e827f1
fix(server): stop a cancelled setup's branch rename before forgetting…
github-actions[bot] Oct 12, 2026
ff5dbc8
feat(server): let agents list and call plugin tools through MCP
github-actions[bot] Oct 7, 2026
f1844a2
feat(server): typed plugin settings, write-only secrets and plugin st…
github-actions[bot] Oct 7, 2026
ab90f2f
fix(server): list no plugins to MCP callers outside a T3 thread
github-actions[bot] Oct 7, 2026
428902e
docs(plugins): say plugins run under the server's account
github-actions[bot] Oct 7, 2026
3c780d4
fix(server): drop a reused credential's reservation when its grant up…
github-actions[bot] Oct 7, 2026
5605a8b
fix(server): refresh open plugin settings when the declared fields ch…
github-actions[bot] Oct 10, 2026
1561cf5
docs(plugins): say plugins run under the server's account
github-actions[bot] Oct 7, 2026
a2a5171
fix(server): finish a plugin's host work before disable returns
github-actions[bot] Oct 10, 2026
1fcbcb2
fix(server): drop a reused credential's reservation when its reuse ch…
github-actions[bot] Oct 7, 2026
a4e2d88
fix(server): wake host calls waiting on a plugin below the stream buffer
github-actions[bot] Oct 10, 2026
31ca0af
merge: adapt panel host to current chat surface renderer
saphid Oct 17, 2026
090f510
merge: preserve device and terminal panels on current chat renderer
saphid Oct 17, 2026
1986ba1
merge: integrate registered Files and pull request panels with main
saphid Oct 17, 2026
461ef0b
merge: preserve Pi contribution statuses and scoped Files actions
saphid Oct 17, 2026
06c8449
Merge remote-tracking branch 'upstream/main' into resolve-16045
saphid Oct 17, 2026
8afc8ce
merge: retain mobile provider status strip on current thread screen
saphid Oct 17, 2026
d5c6b3b
merge: reconcile plugin host stack with main
saphid Oct 17, 2026
63ef2f6
merge: reconcile plugin events stack with main
saphid Oct 17, 2026
fb82997
merge: reconcile plugin tools stack with main
saphid Oct 17, 2026
a9a535d
merge: reconcile plugin settings stack with main
saphid Oct 17, 2026
2ccb588
chore: resolve merge conflicts with main
saphid Oct 17, 2026
04c15af
test(web): migrate panel registry tests to the browser runner
github-actions[bot] Oct 17, 2026
30c2a98
fix(web): update panel tests for compiled browser runs
github-actions[bot] Oct 17, 2026
5bf4f23
fix(web): migrate registered panel tests to React DOM
github-actions[bot] Oct 17, 2026
c467a0b
fix(web): update panel and Pi status compiler coverage
github-actions[bot] Oct 17, 2026
7c5aa27
fix(clients): restore status layer compiler and import compatibility
github-actions[bot] Oct 17, 2026
936890d
fix: repair plugin stack checks and reject ambiguous source filenames
github-actions[bot] Oct 17, 2026
cc34f24
fix(plugins): reject ambiguous filenames and repair stack compatibility
github-actions[bot] Oct 17, 2026
b6d612e
fix: restore plugin tools stack compatibility and exact source consent
github-actions[bot] Oct 18, 2026
495c54f
fix(web): run panel registry tests with React DOM
github-actions[bot] Oct 18, 2026
cdcbdbd
fix(plugins): wait for startup registrations before granting tools
saphid Oct 19, 2026
c5a79ca
fix(plugins): wait for startup registrations before granting tools
saphid Oct 19, 2026
1d3f61c
fix(server): recover secret temporary files after a crash
saphid Oct 19, 2026
b308976
fix(plugins): reread settings after coalesced notifications
saphid Oct 19, 2026
931cc6b
fix(plugins): inherit exact UTF-8 source consent checks
saphid Oct 19, 2026
dca60f4
style(plugins): remove obsolete settings section divider
saphid Oct 19, 2026
66b3e07
style(plugins): format touched plugin modules
saphid Oct 19, 2026
a52eb9a
chore: resolve #16043 conflicts with current main
saphid Oct 19, 2026
c2b2507
merge: reconcile plugin PR 16047 with current main
saphid Oct 19, 2026
b787a61
chore: resolve #16038 conflicts with current main
saphid Oct 19, 2026
e46e515
merge: reconcile plugin PR 16048 with current main
saphid Oct 19, 2026
54ea435
chore: resolve #15010 conflicts with current main
saphid Oct 19, 2026
eeb77d4
merge: reconcile plugin PR 16049 with current main
saphid Oct 19, 2026
6175acc
merge: reconcile plugin PR 16050 with current main
saphid Oct 19, 2026
3bef9c6
chore: resolve #16041 conflicts with current main
saphid Oct 19, 2026
9d6c95a
chore: resolve #16045 conflicts with current main
saphid Oct 19, 2026
8be6c1b
chore: resolve #16046 conflicts with current main
saphid Oct 19, 2026
39e3f91
merge: integrate current main into panel host
saphid Oct 20, 2026
116c5b8
merge: integrate current main and migrate device panel coverage
saphid Oct 20, 2026
9bdb7b9
merge: integrate current main into files panel
saphid Oct 20, 2026
304575b
fix(web): scope file open shortcuts to the active panel
saphid Oct 20, 2026
274afa0
merge: integrate current main into #16045
saphid Oct 20, 2026
c6559e0
fix(web): scope file open shortcuts to the active panel
saphid Oct 20, 2026
ed6ec16
test(web): supply the file browser composer action
saphid Oct 20, 2026
3e56355
merge: integrate current main into #16046
saphid Oct 20, 2026
7cca359
fix(web): scope file open shortcuts to the active panel
saphid Oct 20, 2026
8e387b4
test(web): supply the file browser composer action
saphid Oct 20, 2026
6461543
fix(mobile): keep browser controls below contribution statuses
saphid Oct 20, 2026
ed343be
merge: integrate current main into plugin host
saphid Oct 20, 2026
eb0af4b
fix(web): scope file open shortcuts to the active panel
saphid Oct 20, 2026
f492102
fix(mobile): keep browser controls below contribution statuses
saphid Oct 20, 2026
ecee4ae
fix(mobile): include status overlays in sent-message anchoring
saphid Oct 20, 2026
f109887
fix(web): retain device operation state for its starting thread
saphid Oct 20, 2026
9e66b60
test(server): provide plugins to config RPC integration
saphid Oct 20, 2026
614c4f2
merge: integrate current main into plugin events
saphid Oct 20, 2026
8f6fb77
fix(web): scope file open shortcuts to the active panel
saphid Oct 20, 2026
8ffd03d
fix(mobile): keep browser controls below contribution statuses
saphid Oct 20, 2026
8aac62c
fix(mobile): include status overlays in sent-message anchoring
saphid Oct 20, 2026
0e65401
test(server): provide plugins to config RPC integration
saphid Oct 20, 2026
0dcc5b4
merge: integrate current main into #16049
saphid Oct 20, 2026
176e6c3
fix(web): scope file open shortcuts to the active panel
saphid Oct 20, 2026
ae01f73
fix(mobile): keep browser controls below contribution statuses
saphid Oct 20, 2026
c57260e
fix(mobile): include status overlays in sent-message anchoring
saphid Oct 20, 2026
6adc994
test(server): provide plugins to config RPC integration
saphid Oct 20, 2026
7cc224b
test(server): verify plugin grants reach the composed runtime
saphid Oct 20, 2026
119b576
merge: integrate current main into #16050
saphid Oct 20, 2026
1e3f457
fix(web): scope file open shortcuts to the active panel
saphid Oct 20, 2026
41d7242
fix(mobile): keep browser controls below contribution statuses
saphid Oct 20, 2026
25c0e76
fix(mobile): include status overlays in sent-message anchoring
saphid Oct 20, 2026
fcc1b22
test(server): provide plugins to config RPC integration
saphid Oct 20, 2026
aeab172
fix(clients): follow current panel and mobile module APIs
saphid Oct 20, 2026
618802f
test(server): verify plugin grants reach the composed runtime
saphid Oct 20, 2026
89eeb46
test(server): provide plugin settings to config RPC integration
saphid Oct 20, 2026
59b93e0
fix(server): preserve live secret writers during temporary cleanup
saphid Oct 20, 2026
d39875f
merge: preserve plugin settings alongside current main
saphid Oct 20, 2026
3621e50
fix(clients): preserve current panel tests and detail tabs
saphid Oct 20, 2026
2b5d254
fix(plugins): bound source traversal and preserve cancellation ownership
saphid Oct 20, 2026
be0b931
fix(web): default the registered pull request detail tab
saphid Oct 20, 2026
0cabfdc
test(plugins): synchronize the first persisted cursor reconciliation
saphid Oct 20, 2026
3e3282b
test(plugins): seed the persisted cursor timestamp
saphid Oct 20, 2026
a8a475b
style(plugins): name the event quarantine effect
saphid Oct 20, 2026
f48abd2
merge: preserve PR 15010 behavior on current main
saphid Oct 20, 2026
cdaf638
merge: preserve panel host with current diff session behavior
saphid Oct 20, 2026
b006774
test(web): adapt current diff tests to the panel host
saphid Oct 20, 2026
1e261e2
merge: preserve device panel guards and current main test imports
saphid Oct 20, 2026
09aa8ca
merge: preserve files panels and current pull request identity
saphid Oct 20, 2026
f48f6d6
fix(web): import detail tab type from the panel store
saphid Oct 20, 2026
746f10d
fix(web): default registered pull request detail tab
saphid Oct 20, 2026
fecc4f1
merge: preserve contribution status and files regression coverage
saphid Oct 20, 2026
dd57467
merge: retain mobile status geometry with current panel foundations
saphid Oct 20, 2026
5665be2
merge: preserve plugin host and migrations after current main
saphid Oct 20, 2026
0e14003
fix(server): bound plugin source walks and protect supervisor handoffs
saphid Oct 20, 2026
b818ad5
merge: preserve plugin events and delegated completion transactions
saphid Oct 20, 2026
4876dfc
fix(server): reconcile persisted plugin event cursors
saphid Oct 20, 2026
5133ae4
refactor(server): keep event sink helpers under their operation spans
saphid Oct 20, 2026
08b7f23
merge: preserve plugin tool runtime and inherited event repairs
saphid Oct 20, 2026
edaf580
test(server): deduplicate runtime session import after main integration
saphid Oct 20, 2026
3ea0333
refactor(server): preserve plugin event sink operation tracing
saphid Oct 20, 2026
4c09c75
fix(plugins): carry verified session and recovery repairs
saphid Oct 20, 2026
5cebb0c
fix(plugins): carry verified session and recovery repairs
saphid Oct 20, 2026
918e883
fix(plugins): carry verified session and recovery repairs
saphid Oct 20, 2026
e3db3e6
fix(plugins): carry verified session and recovery repairs
saphid Oct 20, 2026
52f6768
fix(plugins): carry verified session and recovery repairs
saphid Oct 20, 2026
94e8e62
fix(plugins): carry verified session and recovery repairs
saphid Oct 20, 2026
c043f6b
fix(plugins): carry verified session and recovery repairs
saphid Oct 20, 2026
995e4fc
fix(plugins): carry verified session and recovery repairs
saphid Oct 20, 2026
bf013c6
fix(plugins): carry verified session and recovery repairs
saphid Oct 20, 2026
e41dec0
fix(web): match registry fixtures to available panels
saphid Oct 20, 2026
0b48776
fix(web): supply the panel host in PR tab restoration test
saphid Oct 20, 2026
65a86e0
fix(web): supply the panel host in PR tab restoration test
saphid Oct 20, 2026
a03587c
fix(web): supply the panel host in PR tab restoration test
saphid Oct 20, 2026
42bac51
fix(web): supply the panel host in PR tab restoration test
saphid Oct 20, 2026
2da00e3
fix(web): supply the panel host in PR tab restoration test
saphid Oct 20, 2026
55c8d53
fix(web): supply the panel host in PR tab restoration test
saphid Oct 20, 2026
54042f1
fix(web): supply the panel host in PR tab restoration test
saphid Oct 20, 2026
a7350b7
refactor(web): integrate panel host with main component boundaries
saphid Oct 23, 2026
192bc98
refactor(web): preserve device and terminal panels on current main
saphid Oct 23, 2026
040202c
fix(web): preserve scoped device operation errors across thread switches
saphid Oct 23, 2026
babbab1
refactor(web): integrate files and pull request panels with main
saphid Oct 23, 2026
eff86b0
chore(pi): integrate main while preserving extension statuses
saphid Oct 23, 2026
30dbe3f
chore(pi): preserve main blank-question validation in status stack
saphid Oct 23, 2026
c8294eb
chore(mobile): integrate main while preserving Pi status geometry
saphid Oct 23, 2026
29eca2a
fix(plugins): integrate main and preserve revocation and shutdown safety
saphid Oct 23, 2026
472b696
fix(plugins): integrate event feed with current persistence and outcomes
saphid Oct 23, 2026
aa0aefc
fix(plugins): integrate tool grants with current session lifecycle
saphid Oct 23, 2026
79ac3bc
fix(plugins): reconcile preview migrations and retain private setting…
saphid Oct 23, 2026
555e926
fix: integrate current main while preserving PR 15010 behavior
saphid Oct 23, 2026
03a544e
fix(plugins): repair current CI fixtures and preserve scoped behavior
saphid Oct 23, 2026
7b3fcea
fix(plugins): repair current CI fixtures and preserve scoped behavior
saphid Oct 23, 2026
6433423
fix(plugins): repair current CI fixtures and preserve scoped behavior
saphid Oct 23, 2026
fa1404b
fix(plugins): repair current CI fixtures and preserve scoped behavior
saphid Oct 23, 2026
25f29b9
fix(plugins): repair current CI fixtures and preserve scoped behavior
saphid Oct 23, 2026
d3062cc
fix(plugins): repair current CI fixtures and preserve scoped behavior
saphid Oct 23, 2026
cf941d9
docs(plugins): describe persisted swap recovery accurately
saphid Oct 23, 2026
d95a5b7
docs(plugins): describe persisted swap recovery accurately
saphid Oct 23, 2026
7ad8af2
docs(plugins): describe persisted swap recovery accurately
saphid Oct 23, 2026
ab9055e
docs(plugins): describe persisted swap recovery accurately
saphid Oct 23, 2026
a8f4c62
docs(plugins): describe persisted swap recovery accurately
saphid Oct 23, 2026
83f31b0
fix(plugins): repair current CI fixtures and preserve scoped behavior
saphid Oct 23, 2026
753e629
fix(plugins): repair current CI fixtures and preserve scoped behavior
saphid Oct 23, 2026
c52345b
fix(web): align lazy panel fixtures with current runtime contracts
saphid Oct 23, 2026
b1af53d
fix(web): align lazy panel fixtures with current runtime contracts
saphid Oct 23, 2026
221c2c5
fix(web): align lazy panel fixtures with current runtime contracts
saphid Oct 23, 2026
5665e03
fix(web): align lazy panel fixtures with current runtime contracts
saphid Oct 23, 2026
87d37a3
fix(web): align lazy panel fixtures with current runtime contracts
saphid Oct 23, 2026
50dbc1b
fix(web): align lazy panel fixtures with current runtime contracts
saphid Oct 23, 2026
c6ddef4
fix(web): align lazy panel fixtures with current runtime contracts
saphid Oct 23, 2026
3bc1b4c
fix(web): align lazy panel fixtures with current runtime contracts
saphid Oct 23, 2026
9c5651c
test(web): align plugin render lifecycle and available panel counters
saphid Oct 23, 2026
812bcf6
test(web): align plugin render lifecycle and available panel counters
saphid Oct 23, 2026
22002e4
test(web): align plugin render lifecycle and available panel counters
saphid Oct 23, 2026
ae72863
test(web): align plugin render lifecycle and available panel counters
saphid Oct 23, 2026
45d329b
test(web): align plugin render lifecycle and available panel counters
saphid Oct 23, 2026
a1c136e
test(web): align plugin render lifecycle and available panel counters
saphid Oct 23, 2026
f728641
test(web): align plugin render lifecycle and available panel counters
saphid Oct 23, 2026
f23aeac
test(web): align plugin render lifecycle and available panel counters
saphid Oct 23, 2026
1182393
Merge remote-tracking branch 'origin/main' into ready/plugins-15010-2…
saphid Oct 31, 2026
6af59a7
Merge branch 'ready/plugins-15010-20261031' into ready/plugins-16038-…
saphid Oct 31, 2026
2ca4b4c
fix(web): adapt panel fixtures to current browser bridge and registry
saphid Oct 31, 2026
b2f7da8
fix(web): integrate current device and terminal behavior into panel host
saphid Oct 31, 2026
6898fd2
fix(web): integrate current file preview behavior into Files panel host
saphid Oct 31, 2026
fbb7a0f
test(web): retain current file-preview regressions through panel host
saphid Oct 31, 2026
27b43a3
fix(pi): preserve current provider and sharing behavior in status int…
saphid Oct 31, 2026
fd8bf13
fix(mobile): preserve current layout alongside Pi statuses
saphid Oct 31, 2026
4024f16
fix(plugins): integrate event feed with current orchestration and mig…
saphid Oct 31, 2026
a13adfa
fix(web): format migrated device fixtures and remove obsolete prop type
saphid Oct 31, 2026
cf7c376
fix(plugins): preserve MCP context and subagent credential boundaries
saphid Oct 31, 2026
edf44f9
fix(plugins): retain current secrets behavior and append settings mig…
saphid Oct 31, 2026
134cb43
test(web): adapt panel fixtures to current host and focus APIs
saphid Oct 31, 2026
5c62ee3
test(web): preserve current entity and focus exports in panel fixtures
saphid Oct 31, 2026
2ca936d
test(web): inherit current Device and terminal fixtures
saphid Oct 31, 2026
faf50a4
test(web): adapt terminal attachment fixture to session atoms
saphid Oct 31, 2026
cec9e9b
test(web): isolate breadcrumb fixtures from browser defaults and edit…
saphid Oct 31, 2026
4254cbd
fix(plugins): carry updated parent layer into #16045
saphid Oct 31, 2026
17e0646
test(web): follow moved source-control actions and primary environmen…
saphid Oct 31, 2026
74953e1
fix(plugins): carry updated parent layer into #16048
saphid Oct 31, 2026
50614e4
fix(plugins): carry updated parent layer into #16045
saphid Oct 31, 2026
132b358
fix(plugins): carry updated parent layer into #16046
saphid Oct 31, 2026
e069d44
test(plugins): cover preview ledgers against newer main migration slots
saphid Oct 31, 2026
39f8d29
fix(web): preserve scoped file actions and make panel readiness fixtu…
saphid Oct 31, 2026
a500f29
fix(plugins): carry updated parent layer into #16046
saphid Oct 31, 2026
08c76cf
fix(plugins): carry updated parent layer into #16048
saphid Oct 31, 2026
0b36b43
fix(pi): retain desktop contracts and current panel dependencies
saphid Oct 31, 2026
255d6aa
fix(plugins): carry updated parent layer into #16046
saphid Oct 31, 2026
b3047a4
fix(plugins): carry updated parent layer into #16048
saphid Oct 31, 2026
cccc834
fix(pi): align regression fixtures with current runtime services
saphid Oct 31, 2026
871a02e
fix(plugins): carry updated parent layer into #16046
saphid Oct 31, 2026
91c565d
fix(plugins): carry updated parent layer into #16048
saphid Oct 31, 2026
ca955aa
fix(pi): provide all runtime fixtures and scoped file insertion callb…
saphid Oct 31, 2026
580d1af
fix(plugins): carry updated parent layer into #16048
saphid Oct 31, 2026
bd935e0
refactor(mobile): keep status layout constraints concise
saphid Oct 31, 2026
6fe5de3
fix(plugins): carry updated parent layer into #16048
saphid Oct 31, 2026
397485d
fix(plugins): migrate preview ledgers after current main schema
saphid Oct 31, 2026
f589b1e
fix(plugins): carry updated parent layer into #16049
saphid Oct 31, 2026
a9fb7b0
fix(plugins): retain settings preview upgrade cases on current migrat…
saphid Oct 31, 2026
502200c
fix(plugins): align event runtime with current layers and Effect conv…
saphid Oct 31, 2026
d6a613f
fix(plugins): carry updated parent layer into #16049
saphid Oct 31, 2026
d3071ec
fix(plugins): carry updated parent layer into #16050
saphid Oct 31, 2026
5ce70b7
fix(plugins): include tool services in the current context budget
saphid Oct 31, 2026
e3e24ed
fix(plugins): carry updated parent layer into #16050
saphid Oct 31, 2026
4215861
refactor(plugins): keep API constraints concise
saphid Oct 31, 2026
f252bbe
refactor(plugins): retain settings lock within its named Effect function
saphid Oct 31, 2026
27c6da1
fix(plugins): align host call functions and IPC fixture with checks
saphid Oct 31, 2026
5643879
Merge main into Device panel and refresh terminal fixture
saphid Oct 31, 2026
16ce06a
fix(web): preserve side chats in Files panel integration
saphid Oct 31, 2026
9ae02bf
fix(pi): integrate current panels and repair status fixtures
saphid Oct 31, 2026
134cbf9
test(web): align Preview host fixture with panel integration
saphid Oct 31, 2026
1421862
fix(plugins): integrate repaired Pi parent layer
saphid Oct 31, 2026
190c3c2
Merge current main into plugin actions
saphid Oct 31, 2026
2166d35
fix(plugins): integrate event migrations after project organization
saphid Oct 31, 2026
5471276
fix(plugins): integrate current event layer into plugin tools
saphid Oct 31, 2026
06628d6
fix(plugins): integrate settings migration after main project organiz…
saphid Oct 31, 2026
1f8feea
test(server): mark checkpoint fixtures as regular threads
saphid Oct 31, 2026
ef377a2
fix(plugins): bound schema expansion and clean reused PID temporaries
saphid Oct 31, 2026
2497966
Merge commit '79f1fadfc6020b820d541ca4691d2feebb15dd1b' into ready/pa…
saphid Oct 31, 2026
0530823
fix(plugins): enforce agent modes and harden inherited view reads
saphid Oct 31, 2026
3fadfe8
merge: integrate main into plugin settings
maria-rcks Nov 1, 2026
cd9b33e
test(web): adapt diff recovery coverage to panel host
maria-rcks Nov 1, 2026
fa74d20
chore(plugins): merge main into plugin settings branch
saphid Nov 1, 2026
7284620
chore: merge main into plugin settings
maria-rcks Nov 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 112 additions & 0 deletions apps/mobile/src/features/threads/ThreadContributionStatusStrip.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
import { useAtomValue } from "@effect/atom-react";
import type {
ContributionStatusTone,
EnvironmentId,
ProviderDriverKind,
ThreadId,
} from "@t3tools/contracts";
import { useMemo } from "react";
import { Alert, Platform, Pressable, ScrollView, View } from "react-native";

import { AppText as Text } from "../../components/ui/AppText";
import { ProviderIcon } from "../../components/ProviderIcon";
import { cn } from "../../lib/cn";
import { contributionStatusEnvironment } from "../../state/contribution-status";
import {
reservesContributionStatusBand,
threadContributionStatusChips,
threadHasContributionStatus,
} from "./thread-contribution-status-presentation";

/** The strip's height: one row of chip touch targets (44pt iOS, 48dp Android). */
const STRIP_HEIGHT = Platform.OS === "android" ? 48 : 44;

// Neutral, the default, has no dot: Pi status text often brings its own glyph.
const TONE_DOT_CLASS = {
neutral: null,
info: "bg-adaptive-sky-600-400",
success: "bg-adaptive-emerald-600-400",
warning: "bg-adaptive-amber-700-400",
error: "bg-adaptive-rose-600-400",
} as const satisfies Record<ContributionStatusTone, string | null>;

/**
* The band the feed reserves above its first row for the status strip, passed
* to ThreadFeed's `topOverlayInset`. See `reservesContributionStatusBand`.
*/
export function useThreadContributionStatusStripInset(input: {
readonly environmentId: EnvironmentId;
readonly threadId: ThreadId;
readonly supported: boolean;
readonly driver: ProviderDriverKind | undefined;
}): number {
const hasStatus = useAtomValue(
contributionStatusEnvironment.threadStatus(input.environmentId, input.threadId),
threadHasContributionStatus,
);
return reservesContributionStatusBand({ ...input, hasStatus }) ? STRIP_HEIGHT : 0;
}

// The strip overlays the feed; useThreadContributionStatusStripInset reserves its band.
export function ThreadContributionStatusStrip(props: {
readonly environmentId: EnvironmentId;
readonly threadId: ThreadId;
/** Distance from the screen's top edge to the bottom of the navigation header. */
readonly top: number;
readonly contentMaxWidth: number | undefined;
}) {
const entries = useAtomValue(
contributionStatusEnvironment.threadStatus(props.environmentId, props.threadId),
);
const chips = useMemo(() => threadContributionStatusChips(entries), [entries]);
if (chips.length === 0) return null;

return (
<View
pointerEvents="box-none"
className="absolute inset-x-0"
style={{ top: props.top, height: STRIP_HEIGHT }}
>
<View
pointerEvents="box-none"
className="w-full self-center"
style={{ maxWidth: props.contentMaxWidth }}
>
{/* Sized to its chips, so the feed under the empty rest of the row
still takes touches. */}
<ScrollView
horizontal
showsHorizontalScrollIndicator={false}
className="max-w-full grow-0 self-start"
contentContainerClassName="px-2.5"
>
{chips.map((chip) => {
const dotClass = TONE_DOT_CLASS[chip.tone];
// The compact pill sits inside a full-size touch target (44pt
// iOS, 48dp Android); neighbours abut without overlapping.
return (
<Pressable
key={chip.id}
accessibilityRole="button"
accessibilityLabel={chip.accessibilityLabel}
accessibilityHint={chip.tooltip ?? chip.help}
className="min-h-[44px] min-w-[44px] items-center justify-center px-[3px] active:opacity-60 android:min-h-[48px] android:min-w-[48px]"
onPress={() => Alert.alert(chip.details.title, chip.details.message)}
>
<View className="min-h-7 flex-row items-center gap-1.5 rounded-full border border-border-subtle bg-card-alt px-2.5">
{chip.leadsSource ? <ProviderIcon provider={chip.driver} size={12} /> : null}
{dotClass === null ? null : (
<View className={cn("h-1.5 w-1.5 shrink-0 rounded-full", dotClass)} />
)}
<Text numberOfLines={1} className="text-xs text-foreground-secondary">
{chip.text}
</Text>
</View>
</Pressable>
);
})}
</ScrollView>
</View>
</View>
);
}
34 changes: 33 additions & 1 deletion apps/mobile/src/features/threads/ThreadDetailScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ import { ComposerFeedback } from "./ComposerFeedback";
import { ComposerUsageLimits } from "./ComposerUsageLimits";
import { PendingUserInputCard } from "./PendingUserInputCard";
import { ProviderSubagentBar } from "./ProviderSubagentBar";
import {
ThreadContributionStatusStrip,
useThreadContributionStatusStripInset,
} from "./ThreadContributionStatusStrip";
import { ThreadCreationFailedCard } from "./ThreadCreationFailedCard";
import {
FLOATING_WORKING_CONTROL_COVERAGE,
Expand Down Expand Up @@ -1141,6 +1145,12 @@ function ThreadDetailBody(props: ThreadDetailScreenProps) {
providerSubagentProvider.models,
)
: null;
const statusStripInset = useThreadContributionStatusStripInset({
environmentId: props.environmentId,
threadId: props.selectedThread.id,
supported: props.serverConfig?.environment.capabilities.contributionStatus === true,
driver: providerSubagentProvider?.driver,
});
const providerSubagentCatalogModel = providerSubagentProvider?.models.find(
(model) => model.slug === providerSubagentModelSlug,
);
Expand Down Expand Up @@ -1407,6 +1417,7 @@ function ThreadDetailBody(props: ThreadDetailScreenProps) {
contentInsetEndAdjustment={combinedContentInsetEndAdjustment}
keyboardOffset={composerKeyboardOffset}
contentTopInset={0}
topOverlayInset={statusStripInset}
contentBottomInset={
estimatedOverlayHeight +
(showFloatingStatus ? FLOATING_WORKING_CONTROL_COVERAGE : 0)
Expand Down Expand Up @@ -1434,11 +1445,32 @@ function ThreadDetailBody(props: ThreadDetailScreenProps) {
threadId={props.selectedThread.id}
tabs={browserTabs.tabs}
loaded={browserTabs.loaded}
top={navigationHeaderHeight + 8}
top={
navigationHeaderHeight +
(props.usesAutomaticContentInsets === true && Platform.OS === "ios"
? statusStripInset
: 0) +
8
}
onOpen={openBrowserPreview}
/>
) : null}

{showContent ? (
<ThreadContributionStatusStrip
environmentId={props.environmentId}
threadId={props.selectedThread.id}
// A transparent (glass) header overlaps the screen; an opaque one
// ends where the screen begins.
top={
props.usesAutomaticContentInsets === true && Platform.OS === "ios"
? navigationHeaderHeight
: 0
}
contentMaxWidth={contentMaxWidth}
/>
) : null}

{showContent ? (
<KeyboardStickyView
enabled={keyboardStickyEnabled}
Expand Down
14 changes: 12 additions & 2 deletions apps/mobile/src/features/threads/ThreadFeed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ import { cn } from "../../lib/cn";
import {
deriveCenteredContentHorizontalPadding,
deriveThreadFeedInitialContentInset,
deriveThreadFeedTopGeometry,
deriveThreadWorkLogSizing,
type LayoutVariant,
} from "../../lib/layout";
Expand Down Expand Up @@ -363,6 +364,8 @@ export interface ThreadFeedProps {
readonly contentInsetEndAdjustment: SharedValue<number>;
readonly keyboardOffset: number;
readonly contentTopInset?: number;
/** Height of UI floating over the feed's top edge below the header (the status strip). */
readonly topOverlayInset?: number;
readonly contentBottomInset?: number;
readonly historyControls?: ThreadFeedHistoryControls;
readonly contentMaxWidth?: number;
Expand Down Expand Up @@ -2750,6 +2753,11 @@ export const ThreadFeed = memo(function ThreadFeed({
const anchorTopInset = usesNativeAutomaticInsets
? (navigationHeaderHeight ?? insets.top + IOS_NAV_BAR_HEIGHT)
: topContentInset;
const feedTop = deriveThreadFeedTopGeometry({
usesNativeAutomaticInsets,
headerInset: anchorTopInset,
topOverlayInset: props.topOverlayInset ?? 0,
});

const theme = useUniwindTheme();
const iconSubtleColor = theme["--color-icon-subtle"];
Expand Down Expand Up @@ -3353,7 +3361,7 @@ export const ThreadFeed = memo(function ThreadFeed({
presentedFeed,
props.anchorMessageId,
(entry) => (entry.type === "message" ? entry.id : null),
{ anchorOffset: anchorTopInset + CHAT_LIST_ANCHOR_OFFSET },
{ anchorOffset: feedTop.anchorTopInset + CHAT_LIST_ANCHOR_OFFSET },
);
const failedRunIds = failedFeedRunIds(props.feed, props.latestRun);
const terminalAssistantMessageIds = (() => {
Expand Down Expand Up @@ -3760,7 +3768,9 @@ export const ThreadFeed = memo(function ThreadFeed({
scrollEventThrottle={16}
ListHeaderComponent={
<>
{usesNativeAutomaticInsets ? null : <View style={{ height: topContentInset }} />}
{feedTop.spacerHeight > 0 ? (
<View style={{ height: feedTop.spacerHeight }} />
) : null}
{setupAnchorIndex < 0 && props.worktreeSetup ? (
<WorktreeSetupCard key={props.threadId} {...props.worktreeSetup} />
) : null}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
import {
type ContributionStatusEntry,
ProviderDriverKind,
ProviderInstanceId,
ProviderSessionId,
ThreadId,
} from "@t3tools/contracts";
import { describe, expect, it } from "vite-plus/test";

import {
reservesContributionStatusBand,
threadContributionStatusChips,
threadHasContributionStatus,
} from "./thread-contribution-status-presentation";

const entry = (
session: string,
items: ContributionStatusEntry["items"],
driver = "pi",
): ContributionStatusEntry => ({
threadId: ThreadId.make("thread-1"),
source: {
kind: "provider-session",
providerSessionId: ProviderSessionId.make(session),
providerInstanceId: ProviderInstanceId.make(driver),
driver: ProviderDriverKind.make(driver),
},
items,
});

describe("threadContributionStatusChips", () => {
it("shows nothing for a thread without statuses", () => {
expect(threadContributionStatusChips([])).toEqual([]);
});

it("keys chips by source and item key, in the server's order", () => {
const chips = threadContributionStatusChips([
entry("session-a", [
{ key: "mode", text: "● plan" },
{ key: "tokens", text: "12k", tone: "warning", tooltip: "Context is filling up" },
]),
entry("session-b", [{ key: "mode", text: "● plan" }], "codex"),
]);

expect(chips.map((chip) => [chip.text, chip.leadsSource, chip.tone, chip.tooltip])).toEqual([
["● plan", true, "neutral", null],
["12k", false, "warning", "Context is filling up"],
["● plan", true, "neutral", null],
]);
// The same item key under two sources must stay two distinct rows.
expect(new Set(chips.map((chip) => chip.id)).size).toBe(3);
});

it("re-keys a chip when another provider session takes the thread over", () => {
const [before] = threadContributionStatusChips([entry("old", [{ key: "mode", text: "x" }])]);
const [after] = threadContributionStatusChips([entry("new", [{ key: "mode", text: "x" }])]);

expect(after?.id).not.toBe(before?.id);
});

it("attributes the status to its producer without claiming freshness", () => {
const [pi] = threadContributionStatusChips([entry("s", [{ key: "mode", text: "● startup" }])]);
const [codex] = threadContributionStatusChips([
entry("s", [{ key: "mode", text: "busy" }], "codex"),
]);

expect(pi?.accessibilityLabel).toBe("Pi status: ● startup");
expect(pi?.help).toBe("Set by a Pi extension. It can lag a session change.");
expect(codex?.help).toBe("Set by Codex. It can lag a session change.");
});

it("puts the full status text in the details body, where it is never truncated", () => {
const text = "● build — indexing 1,284 files in packages/client-runtime before the next turn";
const [plain, withTooltip] = threadContributionStatusChips([
entry("s", [
{ key: "mode", text },
{ key: "tokens", text: "12k", tooltip: "Context is filling up" },
]),
]);

expect(plain?.details).toEqual({
title: "Pi status",
message: `${text}\n\nSet by a Pi extension. It can lag a session change.`,
});
expect(withTooltip?.details.message).toBe(
"12k\n\nContext is filling up\n\nSet by a Pi extension. It can lag a session change.",
);
});
});

describe("status strip band", () => {
it("counts a thread as having statuses only when an entry has items", () => {
expect(threadHasContributionStatus([])).toBe(false);
expect(threadHasContributionStatus([entry("s", [])])).toBe(false);
expect(threadHasContributionStatus([entry("s", [{ key: "mode", text: "x" }])])).toBe(true);
});

it("keeps a Pi thread's band through set, replace and clear", () => {
const pi = ProviderDriverKind.make("pi");
const band = [false, true, true, false].map((hasStatus) =>
reservesContributionStatusBand({ supported: true, driver: pi, hasStatus }),
);

expect(band).toEqual([true, true, true, true]);
});

it("reserves nothing for other providers without statuses or on servers without the stream", () => {
const codex = ProviderDriverKind.make("codex");
const pi = ProviderDriverKind.make("pi");

expect(
reservesContributionStatusBand({ supported: true, driver: codex, hasStatus: false }),
).toBe(false);
expect(
reservesContributionStatusBand({ supported: true, driver: codex, hasStatus: true }),
).toBe(true);
expect(reservesContributionStatusBand({ supported: false, driver: pi, hasStatus: false })).toBe(
false,
);
});
});
Loading
Loading