You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Optimize project enumeration for `/api/projects` by avoiding file I/O on logs and using filename/metadata for derivations
- Add helper `parse_millis_from_log_name(name: &str) -> Option<u64>` to extract timestamps from `rpc-log-<millis>.(log|json)`
([crates/backend/src/lib.rs:1560](crates/backend/src/lib.rs:1560))
- Replace per-file open/parse with a lightweight pass over directory entries:
- Count matching `rpc-log-*.{log,json}`
- Track `earliest_ts_millis` and `latest_ts_millis` using filename-derived millis
- Track `latest_mtime_secs` fallback from metadata for `lastActivity`
- This materially reduces overhead for large project folders by avoiding disk reads, focusing on filenames and metadata only
- Rename exposed route from `get_projects` to `list_projects` and register new route
- Update Rocket mount to use `list_projects` and add `get_project_discussions` route ([crates/backend/src/lib.rs:588](crates/backend/src/lib.rs:588))
- Rename tauri command `get_projects` → `list_projects` and add performance timing around lock and total execution
([crates/tauri-app/src/lib.rs:213](crates/tauri-app/src/lib.rs:213))
- Print basic timing: lock took N secs, and overall `list_projects` took total N secs
- Add new command `get_project_discussions(projectId)` delegating to backend ([crates/tauri-app/src/lib.rs:334](crates/tauri-app/src/lib.rs:334))
- Update command registration to include `list_projects` and `get_project_discussions` ([crates/tauri-app/src/lib.rs:348](crates/tauri-app/src/lib.rs:348))
- Centralize invocation layer and expose it for both modes
- Export api from `App.tsx` with `invoke(command, args)` abstraction; add desktop/web switches for new commands ([frontend/src/App.tsx:142,166](frontend/src/App.tsx:142))
- Wire `list_projects` and `get_project_discussions` through `api.invoke` so both Tauri and web paths are supported
([frontend/src/App.tsx:166–175](frontend/src/App.tsx:166))
- Implement REST helpers for web mode
- Add `webApi.list_projects({ limit, offset })` calling `GET /projects` ([frontend/src/lib/webApi.ts:184](frontend/src/lib/webApi.ts:184))
- Add `webApi.get_project_discussions(project_id)` calling `GET /projects/:id/discussions` ([frontend/src/lib/webApi.ts:196](frontend/src/lib/webApi.ts:196))
- Comment out legacy dual-mode exported helpers to favor `api.invoke`-based access in pages
- UI integration
- Projects page now loads via `api.invoke("list_projects", { limit, offset })` and renders items
([frontend/src/pages/Projects.tsx:21](frontend/src/pages/Projects.tsx:21))
- Project detail page now loads discussions via `api.invoke("get_project_discussions", { projectId })`
([frontend/src/pages/ProjectDetail.tsx:6,27](frontend/src/pages/ProjectDetail.tsx:6))
- Layout refactor
- Extract shared header and scrollable content shell into new `PageLayout` component
([frontend/src/components/PageLayout.tsx:1](frontend/src/components/PageLayout.tsx:1))
- Replace duplicated header markup in `App.tsx` for `/projects` and `/project/:id` routes with `PageLayout` ([frontend/src/App.tsx:815,827](frontend/src/App.tsx:815))
- **Performance**: Listing projects is now O(n) over directory entries with zero log file parsing, dramatically reducing latency for large histories and making the UI
snappier.
- **Consistency**: Command naming aligned across backend, Tauri, and web layers (`list_projects` vs `get_projects`), reducing confusion and easing future extension.
- **Extensibility**: Introduces `get_project_discussions` plumbing across Tauri and frontend; web API stubs allow REST path while desktop uses native invoke.
- **Maintainability**: `PageLayout` removes duplicated header/branding code and standardizes page shells.
- Backend route mount updated to reflect `list_projects` and new `get_project_discussions` handler exposure.
- Chrome DevTools `.well-known` requests still forward to 422 via SPA guard; unchanged and benign.
- **Backend**: [crates/backend/src/lib.rs:1560](crates/backend/src/lib.rs:1560)
- **Tauri**: [crates/tauri-app/src/lib.rs:213](crates/tauri-app/src/lib.rs:213)
- **Frontend**:
- [frontend/src/App.tsx:142](frontend/src/App.tsx:142)
- [frontend/src/components/PageLayout.tsx:1](frontend/src/components/PageLayout.tsx:1)
- [frontend/src/lib/webApi.ts:184](frontend/src/lib/webApi.ts:184)
- [frontend/src/pages/Projects.tsx:21](frontend/src/pages/Projects.tsx:21)
- [frontend/src/pages/ProjectDetail.tsx:1](frontend/src/pages/ProjectDetail.tsx:1)
0 commit comments