CodeLedger v1.3.0
[1.3.0] — 2026-05-17
Added
- Per-method AI review — each code approach in a multi-method problem gets its own AI review.
MethodCardrenders per-method code + AI review inline in the Methods tab of ProblemModal. Clicking "Generate Review" triggers an immediate on-demand review for that method alone. - Per-method AI review queue —
handleQueueAllAIReviewsnow enqueues${problemId}::method::${index}entries for methods without a review.processAIReviewQueuedetects the::method::pattern and processes them separately from problem-level reviews. - MAINTENANCE_COMMIT alarm — every 10 minutes the service worker batches all pending AI reviews, metadata edits, and notes updates into a single atomic chore commit instead of one commit per edit.
- Bulk import resilience — individual-mode sync (onboarding commit-per-problem) persists its state to
chrome.storage.local. If the browser closes mid-import, aBULK_IMPORT_RESUMEalarm fires 45 seconds after the next browser open to automatically resume. - Onboarding progress bar — the "done" step of GitHubOnboardingModal now shows a live progress bar (current/total) streamed from the SW via a
sync-keepaliveport. "Start Coding" is always enabled; the user can close the modal and sync continues in the background. - Refresh README Stats button — new button in Settings → Git that commits a fresh
index.jsonand triggers a full infra rebuild (README + index.html) from current local data, without needing a new problem commit. Useful after repo recreation or when stats are stale. - Config backup in every commit — every problem commit and every resync now bundles
.codeledger/sync.json(portable settings),.codeledger/behaviour-bank.json, and.codeledger/roadmaps.jsoninto the same atomic tree, keeping user configuration always in sync with the latest solve. GitHub's Trees API deduplicates unchanged blobs so there is no overhead when nothing changed. - Collapsible hints in problem README —
buildProblemMarkdown()now emits a<details><summary>Hint N</summary>block for each hint stored on the problem. Hints are collapsed by default and work in both GitHub's file view and raw markdown. - Canonical path resolution at commit time —
_handleResyncAllInnerpre-loads the canonical map and enriches each problem with its canonical ID before building file paths. Problems previously committed without canonical (e.g., via bulk importer) are now placed underproblems/{canonicalId}/{platform}/on resync. - Two-phase resync with stable commit history —
_handleResyncAllInnernow categorises problems intonewProblems(never committed) andmaintenanceItems(committed but layout/content drifted). Phase A commits only new problems (individual backdated or bulk). Phase B issues a single maintenance commit that atomically writes new-layout files and deletes stale old paths viaopts.deletes→ GitHub Trees APIsha: null. Each problem appears in history exactly once for its initial solve; all subsequent path renames or content updates land in a single maintenance commit per sync cycle — no duplicate commits, no orphaned files. _committedPathstracking — after every commit (regular solve, resync, maintenance) the problem's committed file paths are stored in IndexedDB. Future resyncs use these to compute the exact deletion set instead of guessing.- Remote file tree inference — on resync,
GET /git/trees/{sha}?recursive=1fetches the full repo tree once._inferCommittedPaths()matches problem directory prefixes (including::submissionId-style old paths) to locate all blobs belonging to a problem, enabling correct deletions even for problems committed before_committedPathstracking started. - Landing page library links —
data-cl-openadded to the nav Library link and the CTA button;landing.jsalready rewrites these to the extension URL when the extension is detected. - Landing page platform icons — LeetCode, GeeksForGeeks, and Codeforces chips now use actual favicons instead of emoji.
Changed
- Problem description file renamed to README.md —
descriptionPath()now returns{dir}/README.mdinstead of{dir}/{platformId}.md. GitHub automatically renders this when browsing the problem directory. - Infra bundled into the last meaningful commit —
index.json,README.md,index.html, and.codeledger/*are included in whichever commit is already happening (last problem commit in individual mode, the bulk commit, the maintenance commit). No separate trailing infra commit is issued when problem commits are made. An infra-only commit is still issued when all problems are already up-to-date. - GitHub Pages "src" link uses v3 path —
repoFileUrl()now reconstructs the correct v3 path (problems/{canonicalId}/{platform}/README.mdorproblems/{platformId}/README.md) instead of the old v1 slug-based format. - Language label normalization on GitHub Pages —
pythondata→ "Python (Pandas)",mysql→ "MySQL",postgresql→ "PostgreSQL", etc., for cleaner display in the Recent Solves table and badges. - Recent Solves date includes year — dates in a prior year now display as "Jan 5, 2024" instead of "Jan 5" to avoid ambiguity.
- Removed AI "Progress Summary" from README — the AI-generated narrative block is no longer included in the generated repository README; it produced inconsistent output and added noise.
- Welcome page — removed the Diagnostics & Migration tab and
DiagnosticsPanelcomponent. Path fixes and the two-phase resync make manual layout repair tools unnecessary.
Fixed
::submissionIdsuffix in problem paths —platformId()now strips the::numbersuffix that the LeetCode bulk importer appended (e.g.lc-best-time-to-buy-and-sell-stock::1427680302→lc-best-time-to-buy-and-sell-stock). Affected paths are corrected on the next resync via the maintenance commit.- Stale README stats (one-commit-lag) —
buildInfraFilesnow accepts anindexMetaOverrideparameter. Callers pass the freshly-builtindex.jsondata so README stats reflect the new problem count in the same commit rather than the previous state. - Stale paths not deleted on layout change — old problem files (
{slug}.md,::submissionIddirs, pre-canonical paths) are now explicitly deleted in the maintenance commit viaopts.deletes, eliminating orphaned files that accumulated across layout versions. - GitHub App
read:org401 —/user/orgsreturns 401 for GitHub App tokens that lackread:orgscope. The onboarding modal now silently treats this as an empty org list instead of clearing the valid auth token. - Avatar CORS failure — removed the
Authorizationheader from avatar CDN fetches inlibrary.js;avatars.githubusercontent.comis a public CDN that blocks auth headers via CORS. - LaTeX rendering —
\times,\leq,\geq,\neq,\rightarrow, Greek letters, and other LaTeX symbols are now substituted to Unicode in AI review output viasubstituteLatex()inkatex-stub.js. Applied in bothrenderMath()and inlineparseMarkdown(). - ProblemModal null notes crash — the Notes tab
showguard now usesp?.notessafe navigation, preventing a crash whenpis null during modal initialisation. - AI review batch size — background queue processes 2 items per alarm tick (was 10) to avoid rate-limiting AI providers during backfill.
- On-demand AI review no longer commits immediately —
handleRegenerateAIReviewmarks the problem as pending for the MAINTENANCE_COMMIT batch instead of making an individual commit per review.
See CHANGELOG.md for full details.