4.4 KiB
4.4 KiB
Milestones
2026-12-03 - Pre-cleanup stable baseline
Commit: cd5beee ("Block local/private login hosts; clarify bot-check limits")
Branch: main
Purpose: Known-good working version before production cleanup/refactor. If cleanup breaks behavior, return to this commit.
What works (verified in this cycle)
- Login with screen name/password + math bot check + configurable server host/Web API port/TOC port.
- Local/private/reserved host targets blocked on login (
isDisallowedHostinsrc/routes/auth.js). - Web API + TOC login/session wiring; TOC used for IM/chat/invites on 0.25.0.
- 1:1 IM send/receive, chat join/send/receive, chat invite accept/ignore.
- SSE event stream with replay buffer, 3 SSE connections/IP limit.
- SQLite-backed express-session store, corrupt DB rotation/recovery, session cleanup.
- Tab close: PM tabs close locally; chat tabs best-effort leave then close.
- ICQ webui presence overlay: ICQ/all-digit UINs logged into webui show online in webui buddy lists (synthetic SSE presence), without patching oscar-server.
- Buddy list status dots (online/offline), presence updates.
- CSP/Helmet basics, input normalization/length limits, login/API rate limits.
Quick checks performed before milestone
node --checkon touched JS files during recent changes.- Playwright smoke tests for login/presence flows (steve/8520258 temp accounts).
- Manual curl checks for challenge/login validation and local-host blocking.
Planned cleanup (do not break behavior)
- Remove unused/redundant code, imports, dead paths, and stale artifacts.
- Simplify where safe; keep behavior identical.
- Keep production hardening intact (sessions, validation, rate limits, host blocking, SSE limits).
- Run syntax/smoke checks after each cleanup step; commit incrementally.
Rollback
git checkout main
git reset --hard cd5beee
# or create a branch from it:
git branch pre-cleanup-cd5beee cd5beee
2026-12-03 - Post-cleanup, pre-refactor baseline
Commit: 09e507d ("Cleanup: remove unused redactParams helper")
Branch: main
Purpose: Stable checkpoint after safe cleanup and before any refactors. Return here if refactors cause regressions.
State at this checkpoint
- Includes pre-cleanup baseline behavior (
cd5beee) plus safe cleanup commits. - Removed unused/dead code:
DEV_ID()/bool()insrc/config.js, unusedsetTyping/setChatTyping/listPublicRooms/redactParamsinsrc/oscar.js, unusedsrc/features/broadcasts.js. src/server.jscleanup: removed unused imports; shutdown now stops TOC sessions and passeswebapiBasetoendSession.- Smoke verified after cleanup:
node --checkon src/public JS,/api/health,/api/challenge, Playwright login (steve/please).
Refactor candidates (not started)
- Low risk:
oscar.jsbase-option helper; shared ICQ/normalization helpers; validation consolidation; deadloadFeatures()/stale TODO cleanup. - Medium risk: split
src/routes/auth.jslogin flow; modularizepublic/app.js; dedupe frontend buddy/name helpers; standardize route errors. - Higher risk/defer:
src/toc.jsprotocol refactor, poller/event-shape redesign, CSS restructure without visual tests.
Rollback
git checkout main
git reset --hard 09e507d
# or create a branch from it:
git branch post-cleanup-09e507d 09e507d
2026-12-03 - Post-refactor baseline
Commit: 2ba9870 ("Docs: add durable code comments for OSCAR/TOC architecture and gotchas")
Branch: main
Purpose: Stable checkpoint after low/medium refactors and documentation pass, before further production-hardening changes. Return here if later hardening causes regressions.
State at this checkpoint
- Low/medium refactors complete:
oscar.jsbaseOpt helper, shared screenname utils, deadloadFeaturesremoval, host-check extraction, auth login flow split, small frontend buddy helper dedupe, dead frontend style-toggle cleanup. - Stale M0 TODO code comments removed; durable architecture/protocol/gotcha comments added.
- Verified:
node --checkon src/public JS,/api/health, Playwright login smoke (steve/please).
Planned next
- Graceful shutdown polish (close HTTP server, stop sweep timer, close SQLite DB cleanly).
- Process error handlers (
unhandledRejection,uncaughtException) with clear logging/careful exit.
Rollback
git checkout main
git reset --hard 2ba9870
# or create a branch from it:
git branch post-refactor-2ba9870 2ba9870