# Piscine Graph Tweaks Firefox extension for the EPITA piscine exercise graph (`exercises_c`, `exercises_shell`, …) on `intra.forge.epita.fr`. Two things: **A progress panel**, bottom right of the page: - **validated / total** with the percentage and a segmented bar; - a separate **required** count, which is the one that actually matters; - breakdown: validated, required left, bonus left, locked. **A full screen view of the graph**, because the page crams a ~5000px-wide diagram into a 200px-tall box: - opens at a readable zoom instead of shrinking everything to fit; - **search** — dims everything but the matches, and recentres when there is only one; - **minimap** bottom right, coloured by status; click or drag it to jump anywhere; - **arrow keys** to pan (Shift for 3×), wheel to zoom, shift+wheel to pan sideways, drag to pan, double-click to zoom in, click a node to open the exercise; - `/` search · `Home` readable view · `0` fit everything · `+` / `−` zoom · `Esc` close. No network request is made: everything is read from the page itself. ## How it reads the graph The graph is a mermaid `stateDiagram` rendered as inline SVG, and each node keeps its whole state in its `id`: ``` state-"_required=true/_validated=true/_accessible=true/…/exercises_c/clang~format"-0 ``` So the three booleans are parsed straight from the id — no color guessing — and `~` is mermaid's escape for `-` in the path. Status mapping: | `_validated` | `_accessible` | `_required` | status | |--------------|---------------|-------------|---------------| | `true` | – | – | validated | | `false` | `false` | – | locked | | `false` | `true` | `true` | required left | | `false` | `true` | `false` | bonus left | Verified against the live page: 91 nodes parsed, the only skipped element being mermaid's `state-root_start-1` marker. ## Why there is no "started but unfinished" state There is none in the page. Each node carries exactly those three booleans, and `_validated` only flips once everything passes. An exercise started this morning and one never opened produce **byte-for-byte identical markup** — compare `gdb_wristwatch` and `test_a_bit`, both `_required=true/_validated=false/ _accessible=true`. So per-exercise completion cannot come from this page, and the extension does not pretend otherwise. If you ever want real "started" detection, it has to come from the GitLab API rather than the graph — one call listing the exercise projects and their `last_activity_at` would say which ones you have pushed to: ``` /api/v4/groups//projects?per_page=100&order_by=last_activity_at ``` That is one request for the whole graph, not one per exercise. Not wired in: it needs checking against the real API response first. ## How the full screen view works It **moves** the real `` into the overlay rather than cloning it (a placeholder holds its spot in the page), so mermaid's own `