feat(code): import claude code sessions#2873
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
React Doctor found 1 issue in 1 file · 1 warning. 1 warning
Reviewed by React Doctor for commit |
|
| export const recordCliImportInput = z.object({ | ||
| sourceSessionId: z.string(), | ||
| importedSessionId: z.string(), | ||
| repoPath: z.string(), | ||
| taskId: z.string(), | ||
| fingerprint: cliSessionFingerprintSchema, | ||
| }); |
There was a problem hiding this comment.
recordCliImportInput accepts arbitrary strings for sourceSessionId and importedSessionId
Every other endpoint that uses these values as path segments (importCliSessionInput, deleteImportedCliSessionInput, deleteImportRecordInput) enforces z.string().uuid() with the comment "uuid keeps the value safe to use as a path segment." recordCliImportInput does not, even though the importedSessionId is recorded as a DB key and later passed to deleteImportedCliSessionInput / deleteImportRecordInput which do enforce UUID. The inconsistency means a caller that crafts a non-UUID importedSessionId in the record step could produce a row that is un-deletable via the delete endpoints (they'd reject the non-UUID value). In practice both values always come from the import endpoint's output, but adding .uuid() here makes the contract explicit and defends against future callers.
| export const recordCliImportInput = z.object({ | |
| sourceSessionId: z.string(), | |
| importedSessionId: z.string(), | |
| repoPath: z.string(), | |
| taskId: z.string(), | |
| fingerprint: cliSessionFingerprintSchema, | |
| }); | |
| export const recordCliImportInput = z.object({ | |
| /** uuid keeps the value safe to use as a path segment. */ | |
| sourceSessionId: z.string().uuid(), | |
| /** uuid keeps the value safe to use as a path segment. */ | |
| importedSessionId: z.string().uuid(), | |
| repoPath: z.string(), | |
| taskId: z.string(), | |
| fingerprint: cliSessionFingerprintSchema, | |
| }); |
0f599e5 to
2a00a71
Compare
Client side of importing a Claude Code CLI session: the task-creation saga step that snapshots and records the import (with rollback compensation) and links the session's branch, session replay-history loading on connect, and the new-task picker UI for browsing and importing recent CLI sessions for the selected repo. Part 3/3 of splitting #2873 (import Claude Code sessions). Generated-By: PostHog Code Task-Id: 6c93b6e8-27b6-45c8-8135-73a09076ea93
2a00a71 to
1a2fbf6
Compare
Client side of importing a Claude Code CLI session: the task-creation saga step that snapshots and records the import (with rollback compensation) and links the session's branch, session replay-history loading on connect, and the new-task picker UI for browsing and importing recent CLI sessions for the selected repo. Part 3/3 of splitting #2873 (import Claude Code sessions). Generated-By: PostHog Code Task-Id: 6c93b6e8-27b6-45c8-8135-73a09076ea93
8cbec5f to
b944070
Compare
1a2fbf6 to
d8f4c50
Compare
Client side of importing a Claude Code CLI session: the task-creation saga step that snapshots and records the import (with rollback compensation) and links the session's branch, session replay-history loading on connect, and the new-task picker UI for browsing and importing recent CLI sessions for the selected repo. Part 3/3 of splitting #2873 (import Claude Code sessions). Generated-By: PostHog Code Task-Id: 6c93b6e8-27b6-45c8-8135-73a09076ea93
d8f4c50 to
d46b00c
Compare
b944070 to
e9a736c
Compare
Client side of importing a Claude Code CLI session: the task-creation saga step that snapshots and records the import (with rollback compensation) and links the session's branch, session replay-history loading on connect, and the new-task picker UI for browsing and importing recent CLI sessions for the selected repo. Part 3/3 of splitting #2873 (import Claude Code sessions). Generated-By: PostHog Code Task-Id: 6c93b6e8-27b6-45c8-8135-73a09076ea93
e9a736c to
0253564
Compare
d46b00c to
c316286
Compare
Client side of importing a Claude Code CLI session: the task-creation saga step that snapshots and records the import (with rollback compensation) and links the session's branch, session replay-history loading on connect, and the new-task picker UI for browsing and importing recent CLI sessions for the selected repo. Part 3/3 of splitting #2873 (import Claude Code sessions). Generated-By: PostHog Code Task-Id: 6c93b6e8-27b6-45c8-8135-73a09076ea93
c316286 to
2513dfe
Compare
Client side of importing a Claude Code CLI session: the task-creation saga step that snapshots and records the import (with rollback compensation) and links the session's branch, session replay-history loading on connect, and the new-task picker UI for browsing and importing recent CLI sessions for the selected repo. Part 3/3 of splitting #2873 (import Claude Code sessions). Generated-By: PostHog Code Task-Id: 6c93b6e8-27b6-45c8-8135-73a09076ea93
2513dfe to
a00c253
Compare
a00c253 to
4f1e4ef
Compare
|
Reviews (2): Last reviewed commit: "feat(code): continue a Claude Code sessi..." | Re-trigger Greptile |
0253564 to
fa1ccb0
Compare
4f1e4ef to
d393e71
Compare
fa1ccb0 to
f15ae36
Compare
d393e71 to
ead83ed
Compare
Client side of importing a Claude Code CLI session: the task-creation saga step that snapshots and records the import (with rollback compensation) and links the session's branch, session replay-history loading on connect, and the new-task picker UI for browsing and importing recent CLI sessions for the selected repo. Part 3/3 of splitting #2873 (import Claude Code sessions). Generated-By: PostHog Code Task-Id: 6c93b6e8-27b6-45c8-8135-73a09076ea93
f15ae36 to
4089bea
Compare
ead83ed to
0d627e5
Compare
Client side of importing a Claude Code CLI session: the task-creation saga step that snapshots and records the import (with rollback compensation) and links the session's branch, session replay-history loading on connect, and the new-task picker UI for browsing and importing recent CLI sessions for the selected repo. Part 3/3 of splitting #2873 (import Claude Code sessions). Generated-By: PostHog Code Task-Id: 6c93b6e8-27b6-45c8-8135-73a09076ea93
0d627e5 to
6543cda
Compare

Problem
for activation reasons, we want users to be able to import/resume/continue claude code cli sessions in posthog code
Changes
downstack PRs set up the backend, this PR adds UX for importing sessions, rendered in the "suggestions" list on the new task page
How did you test this?
manually
Automatic notifications