trafficbot

Trafficbot desktop audit — 2026-10-25

Scope: current working tree, original desktop requirements, frontend preview on localhost:1420, TypeScript builds, frontend tests and both linters. No production traffic or configuration changes. Native installers, authenticated operations, worker enrollment and updater installation were not exercised in this audit.

Release blockers

  1. Native engine lifecycle starts the wrong entry point/role. apps/desktop/src-tauri/src/engine.rs starts dist/main.js in development and the compiled main entry in release, with BOT_ROLE=producer. src/main.ts:230-251 submits a batch and shuts down for producer mode. Opening the app can therefore enqueue work and terminate its own API. dev:engine instead runs dist/controller.js, so development paths disagree. Use a long-running management entry point and verify startup never schedules work implicitly.
  2. Onboarding violates React hook ordering. apps/desktop/src/components/Onboarding.tsx:24 returns before the effect at line 41. Dismissing onboarding changes the number of hooks and can crash the dashboard. Move all hooks before conditional returns and cover dismissal and automatic completion.
  3. Settings updates accept arbitrary keys and unescaped values. src/application/api/ControlServer.ts:480-504 converts any submitted key into an environment variable, inserts raw values into .env, and changes process.env without schema validation. Newlines can inject settings. The runtime Config object was parsed earlier, so the returned settings can disagree with effective worker behavior. Add an explicit allowlist, typed validation, safe persistence, and restart-required semantics. Store writable settings outside packaged resources.
  4. Release targets are incomplete. scripts/prepare-desktop-engine.cjs always chooses ARM64 on macOS and x64 on Linux/Windows. Tauri configuration specifies only the app bundle target, which does not provide the required Windows/Linux installer targets. Installed Rust targets alone do not create universal macOS builds. Verify actual native artifacts on each target OS and architecture.

Missing operational functionality

UX and accessibility observations

  1. Dashboard offline: navigation and unknown metric placeholders work. Connection setup requires a token without an in-app retrieval/help path; onboarding is a passive checklist rather than actionable setup guidance. No connected flow was verified.
  2. Sessions offline: table and platform/status filters render. There is no New Session action or stop/retry workflow. At the current narrow browser-panel width, table/filter content overflows horizontally and connection help wraps into a narrow column. Recheck the intended 1100×700 native minimum before classifying this as a desktop layout defect.
  3. Campaigns offline: creation is correctly disabled without a connection, but the empty state says there are no campaigns when data is actually unavailable. Distinguish disconnected/loading/error/confirmed-empty states.

Source inspection also finds campaign labels without explicit input association and detail panels without modal focus management/Escape handling. These are accessibility risks requiring keyboard and assistive-technology testing, not a compliance assessment.

Screenshot evidence: /tmp/trafficbot-app-audit/02-sessions.png (captured and inspected during this run).

Verification results

Check Result
Backend TypeScript build Pass
Desktop TypeScript/Vite build Pass; ~739 kB main JS chunk warning
Frontend tests 13 pass, 3 fail: localStorage.getItem unavailable in Onboarding test environment
Backend lint Fail: 14 unused-variable errors
Frontend lint Reports conditional-hook error and 18 warnings; command still exits successfully
Authenticated engine/session operations Not exercised this run
Native packaging/install/updater Source reviewed; not executed this run

Recommended order: fix engine startup and onboarding, harden settings, restore test/lint gates, complete campaign compatibility selection and session controls, then validate installers and native lifecycle on supported platforms. Feature pages exist for all navigation sections; their existence does not establish end-to-end completeness.