-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture
Statusnone420 edited this page Jun 9, 2026
·
3 revisions
This page is for contributors and AI agents getting oriented in the codebase.
- Desktop shell: Tauri 2
- Backend: Rust
- Frontend: React, TypeScript, Vite
- Parser:
tree-sitter-typescript - Git access:
git2 - Watcher:
notifyandnotify-debouncer-full - Tests: Rust unit tests, Playwright web E2E, Playwright native Tauri E2E
-
src-tauri/src/lib.rsexposes Tauri commands. -
git.rsdiscovers repo roots, branch names, changed files, and file contents. -
session.rsorchestrates file analysis and assemblesSessionData. -
parse.rsparses TypeScript/TSX into a smallParsedtree. -
diff.rscompares before/after parsed trees and assigns stable node IDs. -
rules.rsevaluates security heuristics. -
heuristics.rswalks nodes and attaches flags. -
watcher.rskeeps a debounced live session cache and emitsdrift://updated. -
store.rspersists dismissed flags and reviewed fingerprints per repo. -
report.rsrenders Markdown or JSON exports.
-
src/lib/session.tswraps Tauri commands and provides browser-mode mock behavior. -
src/App.tsxowns app state, repo opening, live updates, selection, triage, review, and export. -
src/components/Toolbar.tsxrenders repo, branch, counts, and review actions. -
src/components/Sidebar.tsxrenders session counts and analyzed files. -
src/components/Center.tsxrenders the selected file's node tree. -
src/components/NodeCard.tsxrenders node state, diff body, and flag chips. -
src/components/RightPanel.tsxrenders active and dismissed flags.
The shared TypeScript shape is in src/types.ts; the Rust mirror is in src-tauri/src/model.rs.
Important objects:
-
SessionData: full payload sent to React. -
Session: repo, branch, counts, reviewed state. -
FileEntry: analyzed file metadata and node tree. -
AstNode: parsed structure plus before/after lines. -
Flag: heuristic finding attached to a node.
Keep these contracts in sync. If a field changes in Rust, update TypeScript, mock data, reports, and tests.
- Stay local-only. Do not add telemetry, model calls, or remote repo uploads.
- Prefer focused heuristics over broad static-analysis claims.
- Keep docs and UI honest about scope: changed
.tsand.tsxdrift. - Make surgical changes. Avoid large rewrites unless a specific bug requires them.