From 39b188c574d99e9f2343e55051d03a7730b2ce35 Mon Sep 17 00:00:00 2001 From: mes123456 Date: Mon, 7 Sep 2026 18:56:30 +0800 Subject: [PATCH] Fix incremental build fingerprint invalidation --- tools/web/web-build-fingerprint.mjs | 9 ++++++--- web/app/src/app/app-shell.css | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/web/web-build-fingerprint.mjs b/tools/web/web-build-fingerprint.mjs index 5e0db6aa0..5de661b2a 100644 --- a/tools/web/web-build-fingerprint.mjs +++ b/tools/web/web-build-fingerprint.mjs @@ -32,12 +32,15 @@ export function inputFiles() { export function fingerprint() { const hash = crypto.createHash("sha256"); for (const file of inputFiles()) { - const stat = fs.statSync(file); + // Read nanosecond metadata as bigint. Without the explicit option + // `mtimeNs` is undefined in Node, so same-sized edits can reuse stale + // bundles indefinitely. + const stat = fs.statSync(file, { bigint: true }); hash.update(path.relative(root, file)); hash.update("\0"); - hash.update(String(stat.size)); + hash.update(stat.size.toString()); hash.update("\0"); - hash.update(String(stat.mtimeNs)); + hash.update(stat.mtimeNs.toString()); hash.update("\n"); } return hash.digest("hex"); diff --git a/web/app/src/app/app-shell.css b/web/app/src/app/app-shell.css index 2a89cf75f..7ef597a24 100644 --- a/web/app/src/app/app-shell.css +++ b/web/app/src/app/app-shell.css @@ -28,7 +28,7 @@ button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus- .topbar-actions button:disabled { color: #606060; background: transparent; cursor: default; } .workspace-tabs { flex: 1 1 auto; align-self: stretch; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; } .workspace-tabs::-webkit-scrollbar, .topbar::-webkit-scrollbar, .workspace-toolbar::-webkit-scrollbar { display: none; } -.workspace-tab { flex: none; min-width: auto; padding-inline: 9px; border: 0; border-radius: 0; font-size: 10px; } +.workspace-tab { flex: none; min-width: auto; padding-inline: 6px; border: 0; border-radius: 0; font-size: 10px; } .workspace-tab.active { color: #fff; background: #303030; box-shadow: inset 0 -2px #4c94c8; } .workspace-add { flex: none; width: 24px; padding: 0; font-size: 16px; } .topbar-actions { flex: none; margin-left: auto; }