Desktop: Isolate CEF-rendered UI into separate crate and process#4321
Conversation
|
!build desktop (Run ID 29061690651) |
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
|
|
|
7666ae8 to
24c5cb2
Compare
|
!build desktop (Run ID 29065912212) |
There was a problem hiding this comment.
2 issues found across 18 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="desktop/ui/src/dirs.rs">
<violation number="1" location="desktop/ui/src/dirs.rs:12">
P2: Replacing the panic with `tracing::error!` avoids crashing, but callers of `app_tmp_dir()` now have no way to know that directory creation failed. The function still returns the path as if it were valid, so downstream code may hit less-obvious IO failures later. Consider propagating the error by changing the return type to `io::Result<PathBuf>` (and updating `temp_dir_root()` accordingly), so callers can handle the failure explicitly.</violation>
</file>
<file name="desktop/ui/src/remote/spawn.rs">
<violation number="1" location="desktop/ui/src/remote/spawn.rs:256">
P2: Replacing `.expect()` with `?` here introduces a partial-startup risk: `InstanceReceivers` has already been consumed from the `HostHandle`, so if this or a subsequent thread spawn fails, earlier threads remain running while the caller gets no `shutdown_complete_receiver` and cannot call `start_instance` again (it would return `InstanceLimit`). Consider ensuring cleanup of already-spawned threads on error, or deferring `receivers.take()` until all spawns succeed.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
|
|
|
There was a problem hiding this comment.
All reported issues were addressed across 15 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
|
!build desktop (Run ID 29287686618) |
|
|
|
There was a problem hiding this comment.
1 issue found across 6 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="desktop/ui/src/ipc.rs">
<violation number="1" location="desktop/ui/src/ipc.rs:1">
P3: This TODO is contradicted by the current module graph: `context.rs` uses `crate::ipc` directly, so inlining `ipc.rs` into `internal` would either break `BrowserContext` or require an unmentioned re-export. Please update or remove the TODO so future refactors do not treat this shared module as internal-only.
(Based on your team's feedback about TODO expectations.) [FEEDBACK_USED].</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
| @@ -1,3 +1,5 @@ | |||
| // TODO: Consider inlining this file into internal as it is no longer use outside | |||
There was a problem hiding this comment.
P3: This TODO is contradicted by the current module graph: context.rs uses crate::ipc directly, so inlining ipc.rs into internal would either break BrowserContext or require an unmentioned re-export. Please update or remove the TODO so future refactors do not treat this shared module as internal-only.
(Based on your team's feedback about TODO expectations.) .
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At desktop/ui/src/ipc.rs, line 1:
<comment>This TODO is contradicted by the current module graph: `context.rs` uses `crate::ipc` directly, so inlining `ipc.rs` into `internal` would either break `BrowserContext` or require an unmentioned re-export. Please update or remove the TODO so future refactors do not treat this shared module as internal-only.
(Based on your team's feedback about TODO expectations.) .</comment>
<file context>
@@ -1,3 +1,5 @@
+// TODO: Consider inlining this file into internal as it is no longer use outside
+
use cef::{Frame, ImplBinaryValue, ImplFrame, ImplListValue, ImplProcessMessage, ImplV8Context, ProcessId, V8Context, sys::cef_process_id_t};
</file context>
| // TODO: Consider inlining this file into internal as it is no longer use outside | |
| // TODO: Consider reorganizing this file; it is shared by context and internal CEF handlers. |
TL;DR: I got tired of dealing with CEF so I isolated it