Skip to content

feat: record orx up launch mode and browser-open failures - #492

Merged
sox8502 merged 4 commits into
mainfrom
daniel/up-launch-mode
Oct 2, 2026
Merged

sox8502 merged 4 commits into
mainfrom
daniel/up-launch-mode

Conversation

@sox8502

@sox8502 sox8502 commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Analytics can now split terminal orx up launches by how the dashboard is presented, and see when a browser launch fails.

  • cli_command for up carries mode: browser, no_browser, ssh (plain orx up in an SSH session, which prints forwarding steps instead of opening a browser), remote (--remote launcher), remote_host (the internal server --remote starts on the box). Derived from UpArgs in one place (UpLaunchMode::of). The desktop app never emits cli_command (it sends cli_app_started), so there's no desktop value.
  • New cli_browser_open_failed { mode }: sent when no opener spawns, or the opener exits non-zero within 5s (e.g. xdg-open with 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.
  • No version bump; this ships with the next release.

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 up command 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 fixes
  • Unit: up_launch_modes_follow_the_dashboard_code_paths (argv → mode for all five values, wire labels); new events covered by the env-disabled inert test
  • Hands-on, production-channel build in an isolated HOME/data dir against a loopback collector (ORX_TELEMETRY_HOST): orx up → browser; --no-browser → no_browser; SSH_CONNECTION set → ssh; --remote (unreachable host) → remote; --no-browser --remote-host → remote_host
  • Hands-on browser failures: opener exiting 1 → cli_browser_open_failed {mode: browser}; no opener on PATH → same event; successful opener → no event
  • Payloads validated against the deployed (origin/main) server contract: old {command} accepted; mode and the new event rejected (which confirms the rollout order)
  • Rows stored with the right launch_mode against 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 rejections
  • Release contract gate (production_contract_is_accepted) passes against the #644 API
  • Full --remote round trip (gateway browser open on a real remote box)
  • Greptile 5/5 on the merged head (5a74190)
  • Linux/Windows: xdg-open without a display / rundll32 failure reports the event

Co-Authored-By: Claude <noreply@anthropic.com>
@sox8502

sox8502 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review

@greptile-apps

greptile-apps Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Adds telemetry for dashboard launch modes and browser failures.

The scoped PR diff appears safe to merge after the server contract deployment specified in the rollout plan.

Summary

The PR adds launch-mode information to orx up command telemetry, records browser-opener failures, expands the release contract test to cover all five modes, and bumps the CLI to 0.2.15.

  • The already-running dashboard path now awaits its browser watcher before returning.
  • The release contract test now submits both new event shapes for every launch mode.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[orx up arguments] --> B[Determine launch mode]
  B --> C[Record cli_command]
  B --> D{Open dashboard in browser?}
  D -- Yes --> E[Launch opener]
  E -- Spawn failure or nonzero exit --> F[Record cli_browser_open_failed]
Loading

Reviews (4) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..."

Comment thread src/browser.rs Outdated
Comment thread src/telemetry.rs Outdated
…nch mode

Co-Authored-By: Claude <noreply@anthropic.com>
@sox8502

sox8502 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review

Comment thread src/commands/up.rs
@sox8502

sox8502 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review

@sox8502

sox8502 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

@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.

@sox8502 sox8502 changed the title feat: record orx up launch mode and browser-open failures (v0.2.15) feat: record orx up launch mode and browser-open failures Oct 1, 2026
@sox8502
sox8502 merged commit 7890eab into main Oct 2, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant