This is a vanilla JavaScript Progressive Web App (PWA).
Files:
- index.html
- app.js
- styles.css
- service-worker.js
No frameworks. No build system. No transpilers.
-
Do NOT refactor unrelated code.
-
Do NOT rewrite entire files unless explicitly instructed.
-
Do NOT rename:
- DOM IDs
- class names
- function names
- localStorage keys
-
Do NOT remove or alter existing event listeners unless required.
-
Do NOT modify service-worker caching logic unless explicitly requested.
-
Do NOT introduce duplicate logic or parallel implementations.
Depends on:
- #tabDashboard
- #tabLogs
- #tabSettings
- setTab()
Breaking event listeners will make the app unusable.
Single source of truth:
- #editModeToggle (checkbox)
UI must be controlled ONLY through:
- renderEditModeUI()
Rules:
- ON → show banner
- OFF → hide banner
- No duplicate UI logic allowed
- renderLogs() must NOT duplicate UI state logic
- renderEditModeUI() should be called ONCE at the top only
- Do NOT change sorting, filtering, or mapping logic
- Make the smallest possible change
- Preserve all existing behavior
- Do NOT “clean up” or “optimize” code unless asked
- Do NOT restructure working code
- Prefer patching over rewriting
After any change:
- Tabs switch correctly
- Logs render correctly
- Edit Mode banner behaves correctly
- No console errors
- No duplicate event listeners
- App works a
Before making any code change, act as if this project has strict automated tests.
- Clicking Dashboard opens the dashboard panel
- Clicking Logs opens the logs panel
- Clicking Settings opens the settings panel
- Active tab styling and aria-selected update correctly
- Edit Mode OFF hides the Logs banner
- Edit Mode ON shows the Logs banner
- Toggle state remains correct after refresh
- Toggle state remains correct after switching tabs
- Logs still render without errors
- Filters still work
- Manual log actions still work
- Edit and delete controls only appear when expected
- No duplicate event listeners
- No duplicate render calls unless intentional
- No broken DOM references
- No syntax errors
- No changes to unrelated behaviors
For every requested fix, assume there is a hidden regression test that will fail if:
- an existing feature breaks
- a listener disappears
- a state key changes
- a DOM ID changes
- render order changes unexpectedly
When making edits:
- prefer minimal diffs
- explain what risk was avoided
- list what behaviors were preserved