--- title: Webapp - Chirp Log Review created_date: 2025-09-15 updated_date: 2025-09-15 aliases: tags: --- # Webapp - Chirp Log Review ## Architecture ```mermaid flowchart TD %% Clusters subgraph Client C1[Request upload URL] C2[Upload file via signed URL] C3[Request download URL] C4[Download file] end subgraph Flask F1[Generate signed upload URL] F2[Insert file metadata into Postgres] F3[Generate signed download URL] end subgraph S3 S1[Object: flight123.chirp] end subgraph Postgres D1[(files table)] D2[(log_meta table)] D3[(log_timeseries table)] end %% Upload flow C1 -->|ask upload| F1 F1 -->|return signed URL| C1 C2 -->|PUT file| S3 S3 -->|ack upload| C2 F2 --> D1 %% Download flow C3 -->|ask download| F3 F3 -->|return signed URL| C3 C4 -->|GET file| S3 %% DB relations D1 --> D2 D2 --> D3 ``` ## Feature Implementation Plan ### Frontend prompt ``` You are Claude Sonnet 4. Act as a senior full-stack architect (Flask + Jinja2 + Supabase Postgres). Improve our existing web frontend and related backend APIs with the following requirements: 1) Apply a **modern light theme** to the whole app. 2) Add a **header** with: - OneSec logo (logo.png, already available) - Webapp title: “OneSec Log Server” - A simple navigation bar with “Home” and “Logs” (both link to /web/logs) 3) Add a **footer** showing the current app version (fetch from backend `/api/version` if available, otherwise use a placeholder like v0.1.0). 4) Update `/web/logs`: - Show a **mini calendar** to pick a date. - Display **only logs of the selected day**. - Each log entry should be more user-friendly: • Friendly name (use placeholder_name_1/2/3 for now) • Uploaded date • Log date • Software hash • Total duration • File size • Filename in smaller, muted style 5) Update `/web/logs/` (log detail view): - Layout with header info (Log Name, Log Date, Uploaded Date) - Summary Section: nicely formatted table of metadata + metrics - Plot Section: placeholder with a friendly message “⚠️ Plotting is coming soon. This section will display interactive charts in a future update.” 6) If needed, adjust backend APIs to support: - `GET /api/logs?date=YYYY-MM-DD` → logs for selected day - `GET /api/logs/` → full log detail - `GET /api/version` → return { "version": "v0.1.0" } 7) At the end: - Perform a cleanup (remove obsolete code if any) - Update the README with new usage instructions, API endpoints, and screenshots if possible - Ensure the codebase is consistent and documented Implement all of this in a clean, maintainable way. ``` ## Future Feature Requests - [ ] download plotjuggler binaries for different chirp versions - [ ] download plotjuggler templates for different chirp versions - [ ] make a good one with background coloring, with parameter change indicators, etc - [ ] download log analysis artefacts (pdf reports: generic, control, simplified, etc) - [ ] Analysis and Flagging - [ ] check perf counters, every perf counter should have an okay range - [ ] check non-default parameters and highlight them - [ ] make sure that timeseries parsing can be rerun (and it only reruns if there was a version change on how the timeseries data is processed or if there was an error) - [ ] change from uv run helpers to .vscode tasks. - [ ] add notes and comments sections.