Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .jules/bolt.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
## 2026-07-12 - Optimize renderTaskRow DOM allocations
**Learning:** Caching unattached template nodes and instantiating them via `.cloneNode(false)` reduces DOM instantiation overhead in O(N) render loops significantly.
**Action:** Apply this optimization to other hot-path rendering elements such as rows, cells, and stack containers.
## 2026-07-12 - Inline ternary concatenation vs String.padStart()
**Learning:** Using `String.padStart()` in O(N) hot loops (like date formatters) creates unnecessary string allocations and JS-to-C++ overhead.
**Action:** Prefer using inline ternary string concatenation (e.g., `m < 10 ? '0' : ''`) for simple string formatting in performance-critical paths to reduce GC pressure and execution time.
19 changes: 12 additions & 7 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2682,22 +2682,27 @@ function clamp(value, min, max) {
return Math.min(max, Math.max(min, value));
}

// ⚡ Bolt: 불필요한 문자열 할당 및 JS-to-C++ 오버헤드를 방지하기 위해
// O(N) 반복 구간(hot path)에서 String.padStart() 대신 인라인 삼항 연산자를 사용합니다.
function formatDateInput(date) {
const year = date.getUTCFullYear();
const month = String(date.getUTCMonth() + 1).padStart(2, '0');
const day = String(date.getUTCDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
const m = date.getUTCMonth() + 1;
const d = date.getUTCDate();
return `${year}-${m < 10 ? '0' : ''}${m}-${d < 10 ? '0' : ''}${d}`;
}

function formatLocalDateInput(date) {
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
const m = date.getMonth() + 1;
const d = date.getDate();
return `${year}-${m < 10 ? '0' : ''}${m}-${d < 10 ? '0' : ''}${d}`;
}

function formatCompactDate(date) {
return `${date.getFullYear()}${String(date.getMonth() + 1).padStart(2, '0')}${String(date.getDate()).padStart(2, '0')}`;
const y = date.getFullYear();
const m = date.getMonth() + 1;
const d = date.getDate();
return `${y}${m < 10 ? '0' : ''}${m}${d < 10 ? '0' : ''}${d}`;
}

function formatPercent(value, digits) {
Expand Down
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; object-src 'none'; base-uri 'none'; form-action 'self';" />
<title>ScopeWeave Planner</title>
<link rel="preload" href="styles.css" as="style" />
<link rel="modulepreload" href="cloud-sync.js" />
<link rel="modulepreload" href="analytics.js" />
<link rel="modulepreload" href="app.js" />
<link rel="stylesheet" href="styles.css" />
</head>
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"dependencies": {
"@hono/node-server": "^2.0.12",
"hono": "^4.12.32"
"hono": "^4.13.1"
},
"devDependencies": {
"@playwright/test": "1.61.1",
Expand Down
Loading