Commit graph

8 commits

Author SHA1 Message Date
google-labs-jules[bot]
4f0ee6bc89 feat: add Gzip compression to web dashboard
- Implements Gzip compression for Flask responses > 500 bytes.
- Adds Content-Encoding, Content-Length, and Vary headers.
- Reduces network payload for text-based content.
- Adds comprehensive tests for compression logic.
- Updates Bolt's Journal.
2026-02-21 05:30:54 +00:00
google-labs-jules[bot]
5a00caed73 feat(perf): Pre-compile Jinja2 template in web dashboard
Extracts the dashboard HTML string into a global constant and compiles it
using Jinja2 only once (lazily) instead of re-parsing the string on every
request. This improves response latency for the dashboard.

- Extracted `DASHBOARD_HTML` constant
- Implemented `DASHBOARD_TEMPLATE` lazy compilation
- Replaced `render_template_string` with `DASHBOARD_TEMPLATE.render()`
- Verified with `scripts/test_web_dashboard.py`
2026-02-12 05:13:07 +00:00
google-labs-jules[bot]
0b8a09a572 Add security headers to web dashboard (CSP, HSTS, X-Frame-Options)
- Implemented `@app.after_request` in `scripts/web_dashboard.py` to inject security headers.
- Added `Content-Security-Policy` with `default-src 'self'`, blocking inline scripts.
- Added `X-Content-Type-Options: nosniff`.
- Added `X-Frame-Options: SAMEORIGIN`.
- Added `Referrer-Policy: strict-origin-when-cross-origin`.
- Added unit test `test_security_headers` to `scripts/test_web_dashboard.py` to verify header presence.
- Mitigates Stored XSS, Clickjacking, and MIME sniffing risks.
2026-02-09 11:27:48 +00:00
google-labs-jules[bot]
644c00e696 🎨 Palette: Add skip-to-content link for accessibility 2026-02-08 11:20:56 +00:00
google-labs-jules[bot]
0c59ee6ed8 Bolt: Reduce syscalls in web dashboard
Replaced `os.path.exists()` + `os.path.getmtime()` with a single `os.stat()` call in `scripts/web_dashboard.py` to reduce syscalls by 50% for cache checks. Also pre-calculated static file paths at module level to avoid redundant `abspath` and `join` calls on every request.

Impact:
- Reduces filesystem operations per request.
- Improves code cleanliness by centralizing path constants.
- Verified with existing tests and manual curl check.
2026-01-23 05:19:37 +00:00
google-labs-jules[bot]
9d93a21039 Bolt: Optimize health check endpoint
💡 What: Separated the /health endpoint from the main dashboard rendering logic. It now returns a lightweight JSON response.
🎯 Why: The previous implementation rendered the full Markdown dashboard for every health check, consuming unnecessary CPU and I/O resources during frequent polling.
📊 Impact: Reduces health check processing time from file reading + markdown parsing (~milliseconds) to a simple JSON return (~microseconds).
🔬 Measurement: Verified with new test script scripts/test_web_dashboard.py and updated render.yaml/app.yaml to use the new endpoint.
2026-01-21 05:17:23 +00:00
google-labs-jules[bot]
5fba7c9c32 Merge web dashboard cache and update EA defaults
Merged `bolt-web-dashboard-cache` optimization into `scripts/web_dashboard.py` to improve documentation rendering performance.
Updated `mt5/MQL5/Experts/SMC_TrendBreakout_MTF_EA.mq5` defaults:
- EnableTrading: true
- RiskPercent: 1.0

Verified frontend functionality and passed all repo validation checks.
2026-01-20 08:52:52 +00:00
google-labs-jules[bot]
6b0f95b374 feat: add web dashboard for cloud deployment
- Implemented a Flask-based web dashboard in `scripts/web_dashboard.py` to serve project status and documentation.
- Integrated the web dashboard into `config/startup_config.json` as a managed component.
- Updated `requirements.txt` with `flask` and `markdown` dependencies.
- Added `/health` endpoint for cloud platform health checks.
- Verified system integrity with existing validation and testing scripts.
2026-01-18 22:52:05 +00:00