Repository navigation
feat(nova-desktop): introduce Nova Desktop application - #378
yashdev9274 wants to merge 2 commits into
Conversation
- Added initial setup for the Nova Desktop application, including essential files such as package.json, index.html, and configuration files. - Implemented a GitHub Actions workflow for CI/CD to automate builds and tests for the nova-desktop app. - Created scripts for building and smoke testing the native sidecar. - Established a basic structure for the application with React components and TypeScript configuration. - Included .gitignore files to manage ignored files specific to the nova-desktop environment. - Added README documentation to guide users on running and building the application.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedToo many files! This PR contains 120 files, which is 20 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This organization's CodeRabbit subscription is cancelled. Resubscribe in Billing to continue reviews beyond the free-tier limit.
|
[High impact] The PR adds a desktop route into shared hosted Nova workflows and local project operations. Fix recovery, paused cancellation, missing replies, and wrong-thread stop controls before merging. Findings
|
| async acknowledgePatch(workspaceId: string, previewId: string): Promise<boolean> { | ||
| const workspace = await this.get(workspaceId) | ||
| return this.locked(workspace.path, async () => { |
There was a problem hiding this comment.
Recovery stays blocked after crashes
applyPatch writes its recovery record while holding nova-workspace.lock. A service crash leaves that directory behind, but acknowledgePatch needs the same lock and always gets “Repository is busy.” The user cannot clear recovery or make further changes through Nova. Add safe stale-lock recovery so the new recovery action can unblock the repository.
| requestCancellation: async (userId, sessionId, runId) => (await prisma.agentRun.updateMany({ | ||
| where: { ...owned(userId, sessionId, runId), cancellationAt: null, status: { notIn: ["completed", "cancelled", "failed"] } }, | ||
| data: { cancellationAt: new Date(), cancellationReason: "Requested from Nova Desktop", version: { increment: 1 } }, |
There was a problem hiding this comment.
Paused cancellation never finishes
Cancelling a web run in awaiting_input only sets cancellationAt. That run has already closed its watcher, and its answer and resume paths now reject it because the flag is set. This also happens when cancellation races with a request for input. The task stays paused with cancellation pending forever. Add a path that closes paused resources and records a terminal result.
| } | ||
| return { ...current, text, status, toolResults, error, reconnectAttempts: 0, runStatus: turnEvents.status ?? current.runStatus, canCancelHosted: turnEvents.canCancelHosted, next: turnEvents.next, done: turnEvents.done } | ||
| }) | ||
| if (turnEvents.done) { setHistoryRevision((value) => value + 1); setWorkspaceRevision((value) => value + 1) } |
There was a problem hiding this comment.
Finished cloud replies disappear
In a conversation with more than 100 history entries, completion reloads history from the beginning and discards any pages already loaded. The render condition also hides the completed live cloud reply. The replacement page contains the oldest entries, so the new answer disappears. Keep the reply visible until history includes it, and refresh without resetting the loaded pages.
| if (!active || !sessionRun) return | ||
| setTurn((current) => current && (!current.done || current.runId === sessionRun.runId) ? current : { | ||
| sessionId, runStatus: sessionRun.status, execution: sessionRun.execution, runId: sessionRun.runId, next: 0, prompt: sessionRun.prompt, text: "", status: "Recovering saved activity…", done: false, error: "", | ||
| }) |
There was a problem hiding this comment.
Switching threads preserves another thread’s unfinished turn. Its output is hidden because the conversation checks turn.sessionId, but the composer and stopTurn still use that global object. Opening thread B while a local task runs in A therefore shows a “Stop local task” control in B that stops A. Store turns by thread, or scope recovery and controls to the selected thread.
| const requestedCancellation = watchCancellation(async () => Boolean((await prisma.agentRun.findUnique({ where: { id: posted.runId }, select: { cancellationAt: true } }))?.cancellationAt)) | ||
| const turnSignal = AbortSignal.any([...(input.signal ? [input.signal] : []), turnDeadline, requestedCancellation.signal]) |
There was a problem hiding this comment.
Cancellation appears as failure
Cancelling an executing cloud turn makes the new watcher abort into the generic catch. That catch calls completeRun with failed: true and emits finish with reason: "error". Users who deliberately stop a task therefore see a failed run. Give requested cancellation its own completion path so hosted history and the desktop journal show cancellation instead.
| stream | ||
| .set_read_timeout(Some(Duration::from_secs(20))) | ||
| .map_err(|_| "Could not configure service connection")?; |
There was a problem hiding this comment.
The native bridge stops waiting after 20 seconds, while Codex requests and individual Git commands allow 30 seconds. Some operations make several calls. A slow model lookup or publication can therefore appear to fail while the service continues working. The shared lock also blocks Stop during that wait. Move slow work behind a job result, or align the limits and let control requests run separately.
| // Local runtime emits synchronously; preserve its order in one journal. | ||
| run.bytes += Buffer.byteLength(JSON.stringify(event)) | ||
| if (run.bytes > 2_000_000 || run.events.length >= 10_000) { run.abort.abort(); throw new Error("Local output exceeds limits") } | ||
| run.events.push(event) |
There was a problem hiding this comment.
Local output enters run.events without the journal’s per-event check. LocalCodexRuntime accepts text deltas larger than 100,000 characters, but desktopEventSchema rejects them when saving. One large delta makes every later save of that run fail, so its local-only reply is lost after restart. Split or validate local deltas before storing them.
| case "pulls": return (await listDesktopReviews(user.id)).slice(0, 1000).map((review) => ({ id: String(review.id), title: String(review.prTitle), description: String(review.summary ?? ""), status: String(review.status), detail: `#${review.prNumber}` })) | ||
| case "activity": { | ||
| const activity = await getSettingsActivity(user.id) | ||
| return activity.recent.map((session) => ({ id: session.id, title: session.objective, description: `${session.runCount} runs`, status: session.status, detail: session.updatedAt })) |
There was a problem hiding this comment.
This mapping copies the full session objective into title, which allows only 500 characters. Session creation accepts 20,000 characters and uses the first prompt as the objective. One longer prompt among the recent sessions makes the entire Activity response fail. Shorten the display title or adjust the contract.
| **/.nova-feedback | ||
|
|
||
| # local dev plan | ||
| docs |
There was a problem hiding this comment.
New documentation stays untracked
The unanchored docs rule also ignores the existing apps/docs application. New pages there disappear from normal Git status and staging, so contributors can leave them out of commits. Use /docs/ to ignore only the root-level local planning folder.
| docs | |
| /docs/ |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Description
Please include a summary of the change and which issue is fixed.
Fixes #(issue)
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
bun testpassesbun run typecheckpassesbun run lintpasses (if applicable)Checklist: