Repository navigation
feat(files): integrate Project files with the browser and Mothership - #8781
mzxchandra wants to merge 27 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
@cubic-dev-ai review this PR |
@mzxchandra I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 209 files
Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.
Turn on auto-fix | Re-trigger cubic
|
|
@cubic-dev-ai review this PR |
@mzxchandra I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 209 files
Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.
Turn on auto-fix | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@mzxchandra I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
1 issue found across 209 files
Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.
Turn on auto-fix | Re-trigger cubic
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/mothership-view.tsx">
<violation number="1" location="apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/mothership-view.tsx:142">
P2: This lookup runs for persisted Project tabs even when `projects` or `project-files` is disabled, bypassing the separate release gates. Gate Project lookups and rendering on both flags.
(Based on your team's feedback about gating Project lookups.)</violation>
</file>
|
Validation for the new review fixes:
Physical provider-backed worker/CLI/model/callback acceptance remains open pending authorized provider credentials, a compatible template/snapshot, and a sandbox-reachable callback. The live browser result does not claim that provider coverage. This PR remains draft. |
|
@cubic-dev-ai review this PR |
@mzxchandra I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
1 issue found across 227 files
Confidence score: 5/5
- The Redis-enabled scenario in
project-file-write-transport.integration.tsleaves staleupload_sessionrows because deleting the fixture file and user does not cascade. Delete the session during teardown.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/sim/lib/mothership/agent-cli/project-file-write-transport.integration.ts">
<violation number="1" location="apps/sim/lib/mothership/agent-cli/project-file-write-transport.integration.ts:691">
P3: The Redis-enabled scenario leaves its completed `upload_session` behind while deleting the fixture file and user; these columns have no cascading foreign keys, so every run leaves stale test data. Delete sessions for `f.userId` during teardown.</violation>
</file>
Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Turn on auto-fix | Re-trigger cubic
|
Merged the updated backend parent, preserving the Project file fixes. The incoming change is confined to 12 table files; there is no database schema or migration delta. Validation: nine affected table tests, two Project-tag state regressions (with independent failing guard-removal controls), and the Redis-enabled callback integration test on a fresh database passed. Worker contract sync and the complete 344-command CLI inventory pass against this combined tree. Lint, 58 audits, generators, docs manifest and actual-base block registry checks pass. For the upload-transport review, the installed embedded Project CLI successfully transferred exact bytes to real same-origin and different-origin HTTP receivers while its identity transport accepted only Project control requests. Byte transfer uses global fetch and does not pass through the Project control scope check. Fixture upload-session cleanup was fixed. The earlier live archive browser proof remains valid for the unchanged Project file implementation. Physical provider-backed acceptance remains open pending authorized credentials, a compatible template/snapshot and a sandbox-reachable callback. Fresh exact-head CI and both reviews are requested; this PR remains draft. |
|
@cubic-dev-ai review this PR |
@mzxchandra I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 227 files
Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Turn on auto-fix | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@mzxchandra I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 229 files
Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
View guided diff | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@mzxchandra I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
2 issues found across 229 files
Confidence score: 3/5
resource-content.tsxcan apply workspace preview text to the wrong collaborative Project document when file IDs overlap. Keep preview state off Project files unless ownership is verified.mothership-assistant-tools.tsrejects valid non-UUID project IDs asnextCursor, so callers can’t fetch the next page. Accept a nonempty string to match the project-list contract.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/sim/lib/api/contracts/mothership-assistant-tools.ts">
<violation number="1" location="apps/sim/lib/api/contracts/mothership-assistant-tools.ts:352">
P2: `listProjects` returns a project ID as `nextCursor`, but this UUID constraint rejects valid non-UUID IDs and prevents following that page. Accept a nonempty string, matching the project-list contract.</violation>
</file>
<file name="apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content/resource-content.tsx">
<violation number="1" location="apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content/resource-content.tsx:317">
P1: This sends owner-unqualified preview text to a Project file based only on a matching file ID; a workspace preview can therefore update the wrong collaborative document when IDs overlap. Keep preview state off Project files until the session carries and matches its owner.
(Based on your team's feedback about Project preview ownership.)</violation>
</file>
Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Turn on auto-fix | Re-trigger cubic
| fileId={resource.id} | ||
| downloadSourceRef={downloadSourceRef} | ||
| previewMode={previewMode} | ||
| streamingContent={previewSession?.fileId === resource.id ? textStreamingContent : undefined} |
There was a problem hiding this comment.
P1: This sends owner-unqualified preview text to a Project file based only on a matching file ID; a workspace preview can therefore update the wrong collaborative document when IDs overlap. Keep preview state off Project files until the session carries and matches its owner.
(Based on your team's feedback about Project preview ownership.)
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content/resource-content.tsx, line 317:
<comment>This sends owner-unqualified preview text to a Project file based only on a matching file ID; a workspace preview can therefore update the wrong collaborative document when IDs overlap. Keep preview state off Project files until the session carries and matches its owner.
(Based on your team's feedback about Project preview ownership.) </comment>
<file context>
@@ -291,6 +297,34 @@ export const ResourceContent = memo(function ResourceContent({
+ fileId={resource.id}
+ downloadSourceRef={downloadSourceRef}
+ previewMode={previewMode}
+ streamingContent={previewSession?.fileId === resource.id ? textStreamingContent : undefined}
+ isAgentEditing={isAgentEditing}
+ streamIsIncremental={streamIsIncremental}
</file context>
|
|
||
| /** Project discovery accepts pagination only; the conversation determines the accessible scope. */ | ||
| export const listUserProjectsInputSchema = z.object({ | ||
| cursor: z.string().uuid().optional(), |
There was a problem hiding this comment.
P2: listProjects returns a project ID as nextCursor, but this UUID constraint rejects valid non-UUID IDs and prevents following that page. Accept a nonempty string, matching the project-list contract.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At apps/sim/lib/api/contracts/mothership-assistant-tools.ts, line 352:
<comment>`listProjects` returns a project ID as `nextCursor`, but this UUID constraint rejects valid non-UUID IDs and prevents following that page. Accept a nonempty string, matching the project-list contract.</comment>
<file context>
@@ -347,8 +347,22 @@ export const listWorkspacesInputSchema = z.object({
+/** Project discovery accepts pagination only; the conversation determines the accessible scope. */
+export const listUserProjectsInputSchema = z.object({
+ cursor: z.string().uuid().optional(),
+ limit: z.number().int().min(1).max(100).default(50),
+})
</file context>
| cursor: z.string().uuid().optional(), | |
| cursor: z.string().min(1).optional(), |
Summary
Stacked on #8610, above #8609 and #8590, with #8762 as the lifecycle prerequisite. Pairs with Mothership #594. Keep the feature disabled until compatible app/realtime/background consumers and the companion worker are deployed. No migrations are added here.
Type of Change
Testing
The worker currently supports full-content replacement for Project files; targeted
files editremains unsupported. Local model verification exercised the supported operation. Remote Python/XLSX generation is not claimed as tested here.Checklist