Add /progress dashboard + homepage Resume Reading widget#42
Merged
nomadicmehul merged 3 commits intomainfrom Apr 14, 2026
Merged
Add /progress dashboard + homepage Resume Reading widget#42nomadicmehul merged 3 commits intomainfrom
nomadicmehul merged 3 commits intomainfrom
Conversation
A top-level page at /progress that aggregates the read-progress data written by the Captain's Bridge reader and shows it as a dashboard. Pure client-side. No backend. No new npm dependencies. Reads localStorage keys matching `cloudcaptain.bridge.read.*` and joins them with the full list of docs from Docusaurus's useAllDocsData() client API. Page layout (in order) - ProgressHero — four stat cards: sections read, pages touched, pages complete, last active (relative + absolute timestamp). - Empty state — only when no entries exist; links to DevOps path + Docker start, plus a nudge toward the Seed Demo Data button. - ProgressByTool — expandable groups per tool and per learning path, each with a two-layer progress bar (touched + complete). Click a group to reveal every doc with its status dot (○/◐/●), title, and "N/M" counter. - ProgressControls — four cards: Export JSON, Import JSON (merge or replace), Seed Demo Data (reversible), Reset everything (requires typed "DELETE" confirmation). Utilities (website/src/components/Progress/) - readProgress.ts — localStorage scanner + import/export helpers. Duplicates Bridge's contract so the page could be ported back to a main-based branch if needed. - groupDocs.ts — classifies every doc pathname into a category (Learning paths, Docker, Kubernetes, Terraform, Ansible, Helm, Linux, Bash, Python, Git, YAML, AWS, Azure, GCP, Interview Prep, plus a generic catch-all). Display order + icon configurable. - seedDemo.ts — seedDemoProgress() writes 8 synthetic entries spread across the last 10 days. Safe: refuses to clobber pages that already have non-zero readCount. Reversible: unseedDemoProgress() tracks the keys it wrote via a meta entry. Live updates - The page listens for 'cc-bridge-read-change' (same-tab custom event from useReadProgress) and 'storage' (cross-tab) and rerenders when read state changes. Mark a section complete in another tab and the dashboard updates without a manual refresh. Privacy - All data stays in localStorage. The page banner makes this explicit. - Export produces a portable JSON file; Import supports merge or replace (replace requires re-confirmation via the Reset flow). - Reset requires the user to type DELETE in a confirmation box and is irreversible. Build-time - No sidebar entry needed — this is a top-level page, not a doc. - Footer gets a "📖 Your Progress" link under the "More" column so users can find it without needing the URL. - useAllDocsData() returns whatever the docs plugin indexed, so the page automatically covers new tools as they're added to /docs/tools. SSR - Layout renders an SSR-safe skeleton (Loading…). The real dashboard mounts client-side via BrowserOnly because localStorage doesn't exist on the server.
Two small wins layered onto the /progress page: Navbar link - docusaurus.config.ts: adds "📖 Progress" between "Captain's Journey" and "Contribute" on the left nav. Discoverability for the dashboard without needing to hunt through the footer. Homepage Resume Reading widget - New component: website/src/components/Progress/ResumeReadingWidget.tsx - Renders a "⚓ CAPTAIN'S LOG — Resume where you left off" card between the hero and stats sections of the homepage. - Surfaces the top 3 in-progress docs (readCount > 0 AND !isComplete), sorted by most-recently-updated. - Each row shows: doc title, N / M sections progress counter, relative time (e.g. "2h ago", "3d ago"), an animated progress bar, the doc path, and a "Continue →" CTA. Whole row is a Link to the doc. - Header has "View all progress →" link to /progress. - Joins localStorage entries with useAllDocsData() to resolve doc titles from Docusaurus's indexed doc list (falls back to humanized path segment if a title isn't found). - Live updates via 'cc-bridge-read-change' (same-tab) and 'storage' (cross-tab) event listeners, matching the /progress page behaviour. - Renders nothing when there's no partial progress, so first-time visitors to the homepage see an unchanged hero+stats flow. - Wrapped in BrowserOnly at the index.tsx call site so SSR is unaffected (localStorage doesn't exist on the server). New file: website/src/components/Progress/resumeWidget.module.css Lightweight per-widget CSS module to keep its styling isolated from the dashboard's styles.module.css.
The navbar had hit item-overflow with six links (Learning Paths, Tools & Tech, Cloud Providers, Captain's Journey, Progress, Contribute) on the left plus Sponsor/Coffee/Stars on the right. "Progress" is personal state — it doesn't belong alongside site-structure navigation. - docusaurus.config.ts: drop the '📖 Progress' navbar item. Progress remains discoverable via: - Homepage "Captain's Log" resume widget (primary surface) - Footer "📖 Your Progress" link - Direct URL /progress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a top-level
/progressdashboard and a "Resume Reading" widget on the homepage, both powered by the same localStorage data that Captain's Bridge writes when users mark sections complete.Stacked on top of PR #41 (
feature/captains-bridge-reader). Targets that branch as its base, so this PR's diff reads as the pure Progress feature — no Bridge noise. When #41 merges to main, retarget this PR's base to main (GitHub offers one click) and no rebase is needed.What this ships
/progresspage○/◐/●, title, andN/Mcounter.cloudcaptain-progress-YYYY-MM-DD.jsonDELETEto confirmcc-bridge-read-change(same-tab) andstorage(cross-tab) events.📖 Progressfor discoverability.Homepage Resume Reading widget
⚓ CAPTAIN'S LOG — Resume where you left offcard, slotted between the hero and stats sections.readCount > 0 && !isComplete), sorted by most-recently-updated.N / Mprogress, relative time (2h ago), animated bar, doc path,Continue →.BrowserOnly— SSR is unaffected.Architecture
Files added
Design notes
localStorageis gated byBrowserOnlyor checkstypeof localStorage. A minimal SSR skeleton renders on first paint and the real dashboard hydrates client-side.readProgress.tsduplicates the 20-line localStorage helper that lives inside the Bridge feature (useReadProgress.getAllReadEntries). This duplication is intentional — it keeps the two features decoupled at the source code level but honours the samecloudcaptain.bridge.read.{pathname}key schema at the data level. Refactor into a shared module is easy once both PRs merge.groupDocs.tsholds the regex-to-category mapping with display icons and sort order — one file to update when a new tool section is added.cloudcaptain.bridge.demo-seed;unseedDemoProgress()removes only those keys. Real user progress is never clobbered (seeder refuses to overwrite entries with non-zeroreadCount).Test plan
npm run buildinwebsite/passes — no new warnings from this branch/progress🪄 Seed demo data— hero stats + groups populate instantly, 8 entries across Docker/K8s/Terraform/Linux/Git/DevOpsmkey on a tool page → dashboard live-updates without refreshstorageevent⬇ Export— downloads valid JSON (version:1, entries map)⬆ Import → Merge— adds entries without clobbering⬆ Import → Replace all— wipes then imports↻ Reset— requires typedDELETEconfirmation; clears localStorage🪄 Seed demo data→Remove demo data— clean round-tripreadCount / totalSections/progress📖 Progresslink visible and routes correctly📖 Your Progresslink routes correctlyNot in this PR
careerPaths.json(different semantic model; defer).