feat: BotE Calculator & Scale Sandbox + Smart SRS Knowledge Graph (v1.4.0) - #4
Merged
Merged
Conversation
…emediation Back-of-the-Envelope Calculator (/calculator + global ⌘E modal): - Pure calculation engine (src/utils/bote.js): QPS, storage, cache, bandwidth, and hardware estimates with SI-unit formatters - Scenario presets, log-scale sliders, per-stat formula readouts - Interactive latency cheat-sheet (canonical Dean/Norvig numbers plus modern network figures) with click-to-apply Latency Budget composer - AI Audit My Math endpoint (POST /api/calculator/audit) returning a structured critique via runStructured - 1-click export: Markdown with LaTeX to clipboard, Chat draft, or appended to any Guide section - State persists across navigation via a persisted Zustand store Smart SRS Knowledge Graph (/graph): - ~60-concept prerequisite DAG shared by client and server (src/utils/knowledgeGraph.js), validated acyclic at boot and in tests - Live SM-2 retention heatmap (mastered/due/decayed/unseen) computed from flashcard state; updates without reload after every review - Search, pillar filters, readiness filters, curated learning tracks with topological study sessions, and a node slide-over deep-linking to Guide sections, whiteboards, and due flashcards - Adaptive prerequisite remediation: failing a card queues up to three shaky foundation cards (remediation_queue) into the next session, shown first with a Foundation Checkup banner - Two new guide topics: Caching Strategies and Consensus & Coordination Fixes and refactors: - Fix silent card-grading failure: client sent POST to the PUT-only review route (404); client now sends PUT and the server accepts both - Extract SM-2 scheduler into server/srs/scheduler.js (shared) - BuilderPage supports /builder?board=<id> deep links - Docker image now ships knowledgeGraph.js for the server Testing: 250 tests across 18 files (formula precision, unit conversions, boundary conditions, cycle prevention, traversal, remediation planning, health buckets, and UI interaction suites). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
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
Implements two major features against their business specs, plus a critical SRS bug fix found during implementation.
🧮 Back-of-the-Envelope Calculator & Scale Sandbox (
/calculator,⌘8, quick modal⌘E)src/utils/bote.js) — standard interview conventions:QPS = DAU × req/user ÷ 86,400, storage with retention × replication × overhead, the 80/20 working-set cache, peak bandwidth, and server/shard counts from target CPU saturation. SI-unit formatters up to EB/Tbps, safe at zero and at 2B-DAU extremes.POST /api/calculator/auditreturns a structured, severity-ranked critique (verdict, findings with concrete fixes, omitted real-world factors). Verified live: it correctly recomputed a deliberately wrong cache figure.🕸️ Smart SRS Knowledge Graph & Adaptive Prerequisite Engine (
/graph,⌘7)/builder?board=<id>), and due flashcards with a 1-click node study session.remediation_queuetable. They lead the queue with a Foundation Checkup banner. Solid foundations produce no remediation. Reviewing a queued card resolves it.🐛 Fixed: silent card-grading failure
The client sent
POSTto the review endpoint while the server only registeredPUT— every grade 404'd and was swallowed by the catch handler. The client now sendsPUT; the server accepts both verbs (queued offline mutations may still carry POST). The SM-2 scheduler was extracted toserver/srs/scheduler.jsfor reuse by the graph routes.Testing
🤖 Generated with Claude Code