Skip to content

apps dashboard

bondiano edited this page Nov 12, 2026 · 1 revision

Dashboard

Active contributors: Vassiliy Kuzenkov

The dashboard is a Vue 3 application for reading reviews, following findings and operating a Sych server. It consumes the same-origin HTTP API; it does not run the reviewer or decide whether evidence supports a finding.

Find the right area

Area Guide
Sign-in, repository roles, instance switching and query behavior Session and API client
Pull requests, saved results, feedback and private tours Review reader
Queue, publication recovery, administration, policy and waivers Operations and policy
Overview, usefulness, coverage gaps, cost and latency Analytics
Module boundaries, shared UI, checks and tests Frontend development

Backend admission, workers and publication fencing belong to the server. See the API reference for endpoint contracts rather than treating a hidden button as an authorization rule.

Application structure

graph TD
    Entry["app/entry.ts: router and QueryClient"] --> Shell["App.vue and default layout"]
    Shell --> Pages["pages: URL state and composition"]
    Pages --> Modules["16 modules through public index.ts"]
    Modules --> Api["Api: typed openapi-fetch client"]
    Api --> Server["Same-origin /v1 and /auth"]
    Modules --> Common["common: formatting and URL utilities"]
Loading

web/src/app/entry.ts installs Vue Router and TanStack Vue Query, registers the session guard and updates the document title. web/src/app/App.vue renders public pages without the signed-in shell. web/src/app/layouts/default.vue supplies navigation, the actor, the instance selector and sign-out.

The enforced layering is app → pages → modules → common. Modules publish their usable surface through an index, such as web/src/modules/Runs/index.ts; pages compose several modules rather than importing another module's private component. web/eslint.config.ts enables the strict FEOD structure rules, and web/package.json requires public entries and checks module cycles.

Routes and complete module map

Routes are explicitly registered in web/src/app/router.ts, not generated from filenames. The paths below are router paths; the deployed browser URL prefixes them with /ui. Detail routes for changes and findings accept numeric IDs. Run IDs are strings.

Module Routes or consumers Responsibility Source / test files
Admin /admin Read-only connections, webhook deliveries and effective config 4 / 0
Analytics /analytics Usefulness, honesty, cost and latency views 7 / 1
Api Every domain module Generated HTTP types, same-origin transport and error envelope 2 / 1
Audit /audit Recorded actions and links to supported targets 4 / 1
Changes /changes, /changes/:id Pull requests, revision history, reruns and cancellation 6 / 0
Findings /findings, /findings/:id Finding lineage, filtering, feedback and CSV 6 / 1
Operations /queue Jobs, unresolved publications and explicit recreate decisions 5 / 1
Overview / Summary tiles and daily model usage 5 / 1
Playground /playground, change detail Isolated review tries that publish nothing 4 / 0
Policy /policy Effective policy reconstructed for a pinned run 2 / 0
Runs /runs/:id, change detail Immutable review report, scope, candidates and model calls 15 / 1
Session /login, shell and action controls Caller, role helpers, repository and instance selectors 6 / 2
Suggestions /suggestions Feedback-derived YAML suggestions and maintainer decisions 3 / 0
Tours /runs/:id/tour Private reader progress, reveals and questions 3 / 0
Ui Every page and domain UI Shared shadcn-vue primitives, status badges and notices 55 / 1
Waivers /waivers, finding detail Scoped rule acceptance, expiry and revocation 5 / 2

Each module exposes a public index and keeps implementation files alongside it, as in web/src/modules/Changes/index.ts and web/src/modules/Runs/index.ts. The focused guides identify concrete source files and modification points for each route group.

web/src/pages/login.vue and web/src/pages/[...404].vue are the two public routes. All other routes require a session. The guard is not a route-level role gate: the shell hides Playground and Audit unless the caller maintains some repository, and Admin unless /v1/me reports admin; APIs still authorize direct navigation and requests. This distinction is implemented in web/src/modules/Session/session.ts and web/src/app/layouts/default.vue.

Thin shared areas

  • Ui: web/src/modules/Ui/index.ts exports the shared kit. Status semantics live in web/src/modules/Ui/lib/tone.ts: unknown and partial outcomes need attention, and an unrecognized value stays neutral. The component-generation aliases are in web/components.json; theme variables and Tailwind imports are in web/src/app/styles/main.css.
  • common: web/src/common/composables/useQueryParam.ts makes filters shareable through the URL. Utilities such as web/src/common/utilities/formatMicroUsd.ts, web/src/common/utilities/formatShare.ts and web/src/common/utilities/csvHref.ts keep unknown costs, small samples and CSV filters consistent.
  • globals: web/src/globals/vue-router.d.ts adds only public and title route metadata. It is not a global application store.

These areas have sections in Frontend development, not separate subsystem pages.

Serving and deployment boundary

web/vite.config.ts fixes the asset/history base to /ui/ and proxies /v1 and /auth during development to SYCH_URL, defaulting to http://127.0.0.1:8080. web/src/modules/Api/client.ts uses the browser's origin, so a production build needs no injected bearer token or separate API-origin setting.

crates/sych-app/src/server/ui.rs serves the build from the server's UI directory: page URLs fall back to the SPA, missing hashed assets return 404, successful hashed assets are immutable-cacheable and other responses use no-cache. The Dockerfile copies the Vite output to /usr/share/sych/ui. See server deployment for configuration; the browser project is separate from the documentation site.

Size and history scope

At documented revision 00dc7637f89a47ee6fd4713204f8331418428370, tracked web/src/ contains 162 source files and 18 test files, a test/source file ratio of 18/162 = 11.1%. Source means .ts, .vue or .css excluding tests and web/src/modules/Api/schema.gen.d.ts; tests are .spec.ts or files under a test directory. Checked-in UI primitives and declarations other than the generated API schema are included; root configuration, assets and dependencies are not.

There is 1 unique nonbot author in git log origin/main -- web/src; the byline uses that default-branch history. This is historical participation, not a code-ownership or test-coverage guarantee. Subpage counts use the same method on their named scopes and exclude route pages unless stated.

Key source files

File Why start here
web/src/app/entry.ts App boot, retries, session-expiry handling and shared QueryClient
web/src/app/router.ts Complete route list and public metadata
web/src/app/layouts/default.vue Navigation and caller-sensitive links
web/src/modules/Api/client.ts Transport, errors and idempotency-key helper
web/src/modules/Session/session.ts Session queries, guard and sign-out
web/package.json Dependencies, module policy and all frontend commands
web/eslint.config.ts Architectural import rules and lint exceptions
web/vite.config.ts Deployment base, aliases and development proxy

Modification entry points

  1. For a new screen, add its route to web/src/app/router.ts, compose a page under web/src/pages/, and add navigation in web/src/app/layouts/default.vue if needed.
  2. Put domain requests and components in the matching module and export them through its public index. Decide repository-specific action visibility with Session helpers, but enforce authorization in the server.
  3. Change Rust DTOs/OpenAPI before regenerating client types. Extend report tests when wording changes the meaning of coverage, unknowns or findings.
  4. Run the frontend checks and the repository's testing workflow.

Clone this wiki locally