Skip to content

Commit dccbc0a

Browse files
chore: auto-heal formatting and generated-file drift
1 parent 755b7a2 commit dccbc0a

5 files changed

Lines changed: 19 additions & 17 deletions

File tree

‎src/library/settings-panels/PanelBackups.js‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,8 +770,7 @@ function BehaviorBankData() {
770770
const [msg, setMsg] = useState("");
771771
const fileInputRef = useRef(null);
772772

773-
const countEntries = (bank) =>
774-
Object.keys(bank || {}).filter((k) => !k.startsWith("__")).length;
773+
const countEntries = (bank) => Object.keys(bank || {}).filter((k) => !k.startsWith("__")).length;
775774

776775
const refresh = async () => {
777776
const bank = await Storage.getBehaviorBank().catch(() => ({}));

‎src/library/settings-panels/PanelGamification.js‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -515,9 +515,7 @@ export function PanelGamification({ settings, onSettingsChange }) {
515515
>
516516
<span class="text-base leading-none">🏖️</span>
517517
<div class="flex-1 min-w-0">
518-
<p class="text-xs text-slate-300">
519-
${v.start} → ${v.end || "ongoing"}
520-
</p>
518+
<p class="text-xs text-slate-300">${v.start} → ${v.end || "ongoing"}</p>
521519
${v.note
522520
? html`<p class="text-[11px] text-slate-500 truncate">${v.note}</p>`
523521
: ""}

‎src/library/views/AnalyticsView.js‎

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -903,9 +903,7 @@ export function AnalyticsView({ problems, onNavigate }) {
903903
punchCard: stats.hourMatrix,
904904
},
905905
monthlyDifficulty: stats.monthsDiff,
906-
platforms: Object.fromEntries(
907-
Object.entries(stats.platforms).map(([k, v]) => [k, v.total]),
908-
),
906+
platforms: Object.fromEntries(Object.entries(stats.platforms).map(([k, v]) => [k, v.total])),
909907
languages: stats.langs,
910908
topTopics: Object.entries(stats.topics)
911909
.sort((a, b) => b[1].total - a[1].total)
@@ -1362,7 +1360,12 @@ export function AnalyticsView({ problems, onNavigate }) {
13621360
plugins: {
13631361
legend: {
13641362
position: "bottom",
1365-
labels: { color: "#94a3b8", usePointStyle: true, boxWidth: 8, font: { size: 10 } },
1363+
labels: {
1364+
color: "#94a3b8",
1365+
usePointStyle: true,
1366+
boxWidth: 8,
1367+
font: { size: 10 },
1368+
},
13661369
},
13671370
},
13681371
}}
@@ -1389,7 +1392,8 @@ export function AnalyticsView({ problems, onNavigate }) {
13891392
</div>
13901393
`;
13911394
const m = Math.floor(secs / 60);
1392-
const val = m >= 60 ? `${Math.floor(m / 60)}h ${m % 60}m` : `${m}m ${secs % 60}s`;
1395+
const val =
1396+
m >= 60 ? `${Math.floor(m / 60)}h ${m % 60}m` : `${m}m ${secs % 60}s`;
13931397
return html`
13941398
<div key=${diff} class="flex items-center justify-between">
13951399
<span class="text-sm font-medium" style=${{ color }}>${diff}</span>
@@ -1481,9 +1485,9 @@ export function AnalyticsView({ problems, onNavigate }) {
14811485
AI-Ready Insights Export
14821486
</h3>
14831487
<p class="mt-1 text-xs text-slate-500 leading-snug">
1484-
Everything above as one JSON object — totals, streaks, punch card, monthly
1485-
difficulty mix, topics, solve times. Paste it into any AI chat and ask what to
1486-
practice next. No problem titles or code included.
1488+
Everything above as one JSON object — totals, streaks, punch card, monthly difficulty
1489+
mix, topics, solve times. Paste it into any AI chat and ask what to practice next. No
1490+
problem titles or code included.
14871491
</p>
14881492
</div>
14891493
<button

‎src/popup/popup.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,10 @@ function PopupApp() {
121121
.catch(() => {});
122122
// The popup stays open long enough for a retry to land, so keep the count
123123
// honest with a light poll instead of a one-shot read.
124-
const readPending = () => pendingCommitStatus().then(setPending).catch(() => {});
124+
const readPending = () =>
125+
pendingCommitStatus()
126+
.then(setPending)
127+
.catch(() => {});
125128
readPending();
126129
const timer = setInterval(readPending, 15 * 1000);
127130
return () => clearInterval(timer);

‎worker/public/sw.js‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ self.addEventListener("fetch", (event) => {
5757
caches.open(CACHE).then((cache) => cache.put(event.request, copy));
5858
return res;
5959
})
60-
.catch(() =>
61-
caches.match(event.request).then((hit) => hit || caches.match("/")),
62-
),
60+
.catch(() => caches.match(event.request).then((hit) => hit || caches.match("/"))),
6361
);
6462
return;
6563
}

0 commit comments

Comments
 (0)