Repository navigation
[plugins] add LeetCode Summary bar plugin - #228
Conversation
A topbarGlyph plugin driven by the public alfa-leetcode-api used in the portfolio. An editable username setting means every installer sees their own LeetCode summary. Complete snapshots are cached under stateDir and partial outages never overwrite a good cache.
neur0map
left a comment
There was a problem hiding this comment.
🔴 Changes requested — 0 critical and 1 major issue(s): see the inline comments and the walkthrough for fixes and an agent-ready prompt.
🧹 Nitpicks (2) — optional, not blocking
-
plugins/leetcode-summary/service/Main.qml:69-74— Bug — If the username changes while a request is running,refresh()returns without starting a new request, and the old response replaces the displayed stats. Discard that response and start a request for the current usernam…Suggested change
onExited: {
svc.loading = false;
if (statusProc.command[3] !== svc.username) {
Qt.callLater(svc.refresh);
return;
}
if (String(summaryErr.text).trim().length > 0) console.warn("LEETCODE_SUMMARY_ERR", summaryErr.text);
if (!svc.applyOutput(summaryOut.text))
svc.errorText = String(summaryErr.text).trim().slice(0, 80) || "stats unavailable";
}
-
plugins/leetcode-summary/service/Main.qml:69-74— Suggestion: bug — Refresh after an in-flight username changeSuggested change
onExited: {
svc.loading = false;
if (statusProc.command[3] !== svc.username) {
Qt.callLater(svc.refresh);
return;
}
if (String(summaryErr.text).trim().length > 0) console.warn("LEETCODE_SUMMARY_ERR", summaryErr.text);
if (!svc.applyOutput(summaryOut.text))
svc.errorText = String(summaryErr.text).trim().slice(0, 80) || "stats unavailable";
}
🦊 mika's reviewIncremental review: new commits since the last checkpoint. Summary
Estimated review effort: 1/5 · risk: low 📁 Walkthrough details
|
A result for a username changed while its process ran is consumed but ignored, settings and panel changes queue a refresh, and the timeout path finishes through the same queue.
|
Addressed the username-change finding in 3d7c731. Stale results are discarded, username changes queue a refresh instead of being dropped while a process runs, and the queue is drained from the exit/timeout path. Source repo is in sync at https://github.com/mannish01/LeetCode-Summary. Revalidated: 0 blocking / 0 warnings, catalogue + store validators pass, staged security screen 0 blocking / 0 errors with 0 findings in this plugin. Requesting re-review. |
neur0map
left a comment
There was a problem hiding this comment.
🔴 Changes requested — 0 critical and 1 major issue(s): see the inline comments and the walkthrough for fixes and an agent-ready prompt.
The timeout path now calls finishRefresh() instead of clearing loading directly, so a queued username change starts as soon as the stalled process is stopped.
|
Fixed the follow-up finding in 246c270: the timeout path now calls finishRefresh(), so a queued username change starts as soon as the stalled process is stopped. Source repo synced at https://github.com/mannish01/LeetCode-Summary (f811fe5). Revalidation clean: 0 blocking/0 warnings, catalogue + store pass, security screen 0 errors and 0 findings in this plugin. |
Blocking findings were addressed (verified at 246c270d15).
|
Thanks for the work here, merged with the default username left empty and a 120 second minimum poll, it's live in the store now |
|
Addressed the maintainer's request from #227: the desktop tile is now a second host inside this plugin, so there is no separate copy of the stats code. What changed in 5c2af7f
Verification
Source repo updated first: https://github.com/mannish01/LeetCode-Summary (commit |
What is this?
Adds LeetCode Summary, a community
topbarGlyphplugin: a smallLCglyph on the bar with a click-through panel showing that installer's LeetCode solved counts, global rank, difficulty split, streak, acceptance rate and 12-week activity grid. First uploaded to https://github.com/mannish01/LeetCode-Summary, now proposed for the Ryostore catalogue for approval.Why each installer sees their own summary
The panel has an editable username field — type a handle and press Enter, and
pluginApi.saveSetting("username", …)plus a refresh shows that account's stats. The sameusernamesetting (defaultMANISHX01, the contributor's profile, so the preview is non-empty) is available under QS Bar Settings > Community > LeetCode Summary. It uses the same public alfa-leetcode-api as the contributor's portfolio; no token or login is needed.Changes
plugins/leetcode-summary/withmanifest.json,service/Main.qml,content/Widget.qml,content/Panel.qml,bin/leetcode_summary.py,README.md,LICENSEand a real panel preview.plugins/registry.jsonentry:official: false, upstreammannish01/LeetCode-Summary,lastUpdated2026-11-29.product-manifest.jsonand refreshedmanifestSha256withtools/pack-product.py --touch.Security and privacy
alfa-leetcode-api.onrender.com(read-only public stats) andleetcode.com(opened only on an explicit OPEN PROFILE click).summary.jsonunder the plugin's ownstateDir. A snapshot is live only when all three endpoints answer; a partial outage reuses a matching cached snapshot (markedSAVED.) and never overwrites a good cache. A cache is only read for the username it belongs to.Checklist
plugins/registry.json(lastUpdated2026-11-29,official: false, manifest hash refreshed).Panel.qmlin Quickshell with sample stats; the panel shows the header, editable handle, solved count, rank/streak/acceptance cards, E/M/H bars, 12-week grid and both buttons, with a clean log (only the benign textinput focus warning).tests/validate-catalogue.shpasses from the repo root.tests/validate-store.py --categories pluginspasses.ryoku plugin validate plugins/leetcode-summary→ 0 blocking, 0 warnings.tools/security-screen.py --staged→ 0 blocking, 0 errors; 0 findings in this plugin.