-
Notifications
You must be signed in to change notification settings - Fork 3k
fix(web-shell): expose managedId in artifact open requests #7570
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.
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,6 +66,7 @@ export type TurnOutputOpenRequest = | |
| title: string; | ||
| turnId: string; | ||
| artifactId: string; | ||
| managedId?: string; | ||
| artifact: DaemonSessionArtifact; | ||
| workspaceActions?: DaemonWorkspaceActions; | ||
| previewContent?: string; | ||
|
|
@@ -154,6 +155,7 @@ function TurnOutputsComponent({ | |
| title: artifact.title ?? 'Artifact', | ||
| turnId, | ||
| artifactId: artifact.id, | ||
| ...(artifact.managedId ? { managedId: artifact.managedId } : {}), | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nit] This uses a truthy check while previewContent on the next line uses !== undefined. An empty-string managedId would be silently dropped from the request. If filtering out empty strings is intentional for ids, that seems reasonable - but consider a short comment noting it, so a future consistency refactor to !== undefined does not accidentally change behavior. |
||
| artifact, | ||
| ...(previewContent !== undefined ? { previewContent } : {}), | ||
| }); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[suggestion] Consider adding a focused assertion in App.test.tsx (which already covers onRightPanelOpen): render an artifact with managedId, click Open, and verify request.managedId equals artifact.managedId; also verify that when managedId is absent, the key is not present on the request object. This protects the new public contract from being silently dropped by a future refactor.