feat: record orx up launch mode and browser-open failures - #492
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
|
@greptileai review |
|
…nch mode Co-Authored-By: Claude <noreply@anthropic.com>
|
@greptileai review |
|
@greptileai review |
|
@greptileai review Scope note: head 5a74190 is a merge of origin/main. The side-chat findings in the last summary (parent deletion vs. side-chat cleanup, side-pane shortcut guard) are in code that came from main via #493/#494, not in this PR. This PR's diff vs main is only Cargo.toml/Cargo.lock, src/browser.rs, src/commands/up.rs, src/commands/up_remote.rs, src/main.rs and src/telemetry.rs. Please score that diff. |
Summary
Analytics can now split terminal
orx uplaunches by how the dashboard is presented, and see when a browser launch fails.cli_commandforupcarriesmode:browser,no_browser,ssh(plainorx upin an SSH session, which prints forwarding steps instead of opening a browser),remote(--remotelauncher),remote_host(the internal server--remotestarts on the box). Derived fromUpArgsin one place (UpLaunchMode::of). The desktop app never emitscli_command(it sendscli_app_started), so there's nodesktopvalue.cli_browser_open_failed { mode }: sent when no opener spawns, or the opener exits non-zero within 5s (e.g.xdg-openwith no display). The exit check runs in a background task, so startup never blocks. Openers that keep running (a foreground browser) are treated as success.Rollout order: no release before the server deploy
The server currently rejects both shapes with HTTP 400, and the CLI deletes rejected events, so a release containing this before the server deploy would drop every
orx upcommand event. Deploy https://github.com/alphaXiv/openresearch.sh/pull/644 (migration + API) before the next CLI release. The release workflow's production contract gate now posts both new shapes and fails until the server accepts them. Older CLIs keep validating against the new server.Test plan
cargo fmt --check,clippy -D warnings,build --locked,test --locked(1007 passed), re-run after the Greptile fixesup_launch_modes_follow_the_dashboard_code_paths(argv → mode for all five values, wire labels); new events covered by the env-disabled inert testORX_TELEMETRY_HOST):orx up→browser;--no-browser→no_browser;SSH_CONNECTIONset →ssh;--remote(unreachable host) →remote;--no-browser --remote-host→remote_hostcli_browser_open_failed {mode: browser}; no opener on PATH → same event; successful opener → no event{command}accepted;modeand the new event rejected (which confirms the rollout order)launch_modeagainst a local openresearch.sh API + DB (#644 branch), using a 0.2.15-labelled build before the bump was dropped: every mode plus 2 failure events, 0 rejectionsproduction_contract_is_accepted) passes against the #644 API--remoteround trip (gateway browser open on a real remote box)xdg-openwithout a display /rundll32failure reports the event