Files
t3code/packages/client-runtime/package.json
T
olafuraandClaude Opus 4.8 a279bca0f8 refactor(client): extract the shared older-history lazy-load engine
The lazy-load state machine (~160 lines each) was hand-copied in the web
ChatView and the mobile composer, and every review-round fix had to be
applied to both — half the review churn on this PR was the copies drifting.

One shared hook, `useOlderThreadActivities` in client-runtime, now owns all
of the hardened behavior: reshape-sentinel reset, generation guard,
synchronous in-flight coalescing, the advancing cursor (all-overlap pages
keep paging), dedup against the latest merged set, and hasMore-preserving
failure handling. Clients pass a `loadPage` transport wrapper and keep only
their platform scroll trigger and error surfacing.

The decision kernel (reshape detection, cursor selection, page dedup) is
exported as pure functions with unit tests; react becomes an optional peer
dependency of client-runtime, scoped to the new subpath.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-20 17:27:49 +02:00

167 lines
4.5 KiB
JSON

{
"name": "@t3tools/client-runtime",
"private": true,
"type": "module",
"exports": {
"./connection": {
"types": "./src/connection/index.ts",
"default": "./src/connection/index.ts"
},
"./authorization": {
"types": "./src/authorization/index.ts",
"default": "./src/authorization/index.ts"
},
"./environment": {
"types": "./src/environment/index.ts",
"default": "./src/environment/index.ts"
},
"./errors": {
"types": "./src/errors/index.ts",
"default": "./src/errors/index.ts"
},
"./rpc": {
"types": "./src/rpc/index.ts",
"default": "./src/rpc/index.ts"
},
"./operations": {
"types": "./src/operations/index.ts",
"default": "./src/operations/index.ts"
},
"./operations/projects": {
"types": "./src/operations/projects.ts",
"default": "./src/operations/projects.ts"
},
"./platform": {
"types": "./src/platform/index.ts",
"default": "./src/platform/index.ts"
},
"./relay": {
"types": "./src/relay/index.ts",
"default": "./src/relay/index.ts"
},
"./state/auth": {
"types": "./src/state/auth.ts",
"default": "./src/state/auth.ts"
},
"./state/assets": {
"types": "./src/state/assets.ts",
"default": "./src/state/assets.ts"
},
"./state/connections": {
"types": "./src/state/connections.ts",
"default": "./src/state/connections.ts"
},
"./state/entities": {
"types": "./src/state/entities.ts",
"default": "./src/state/entities.ts"
},
"./state/filesystem": {
"types": "./src/state/filesystem.ts",
"default": "./src/state/filesystem.ts"
},
"./state/git": {
"types": "./src/state/git.ts",
"default": "./src/state/git.ts"
},
"./state/models": {
"types": "./src/state/models.ts",
"default": "./src/state/models.ts"
},
"./state/orchestration": {
"types": "./src/state/orchestration.ts",
"default": "./src/state/orchestration.ts"
},
"./state/presentation": {
"types": "./src/state/presentation.ts",
"default": "./src/state/presentation.ts"
},
"./state/preview": {
"types": "./src/state/preview.ts",
"default": "./src/state/preview.ts"
},
"./state/projects": {
"types": "./src/state/projects.ts",
"default": "./src/state/projects.ts"
},
"./state/project-grouping": {
"types": "./src/state/projectGrouping.ts",
"default": "./src/state/projectGrouping.ts"
},
"./state/relay": {
"types": "./src/state/relayDiscovery.ts",
"default": "./src/state/relayDiscovery.ts"
},
"./state/review": {
"types": "./src/state/review.ts",
"default": "./src/state/review.ts"
},
"./state/runtime": {
"types": "./src/state/runtime.ts",
"default": "./src/state/runtime.ts"
},
"./state/server": {
"types": "./src/state/server.ts",
"default": "./src/state/server.ts"
},
"./state/session": {
"types": "./src/state/session.ts",
"default": "./src/state/session.ts"
},
"./state/shell": {
"types": "./src/state/shell.ts",
"default": "./src/state/shell.ts"
},
"./state/source-control": {
"types": "./src/state/sourceControl.ts",
"default": "./src/state/sourceControl.ts"
},
"./state/terminal": {
"types": "./src/state/terminal.ts",
"default": "./src/state/terminal.ts"
},
"./state/threads": {
"types": "./src/state/threads.ts",
"default": "./src/state/threads.ts"
},
"./state/thread-reducer": {
"types": "./src/state/threadReducer.ts",
"default": "./src/state/threadReducer.ts"
},
"./state/older-thread-activities": {
"types": "./src/state/olderThreadActivities.ts",
"default": "./src/state/olderThreadActivities.ts"
},
"./state/thread-sort": {
"types": "./src/state/threadSort.ts",
"default": "./src/state/threadSort.ts"
},
"./state/vcs": {
"types": "./src/state/vcs.ts",
"default": "./src/state/vcs.ts"
}
},
"scripts": {
"typecheck": "tsgo --noEmit",
"test": "vp test run"
},
"dependencies": {
"@t3tools/contracts": "workspace:*",
"@t3tools/shared": "workspace:*",
"effect": "catalog:"
},
"peerDependencies": {
"react": "^19.0.0"
},
"peerDependenciesMeta": {
"react": {
"optional": true
}
},
"devDependencies": {
"@effect/vitest": "catalog:",
"@types/react": "~19.2.14",
"react": "19.2.6",
"vite-plus": "catalog:"
}
}