Review date: 2025-01-28. Scope: changes on current branch vs main (new version 1.1.0).
| Check | Result |
|---|---|
./scripts/code-review.sh |
Passed (exit 0) |
| HTML structure | index.html, test-example.html OK |
| Shell scripts | All syntax OK |
| Required files | package.json, README.md, LICENSE.md, html/index.html present |
| Warning | 65 console.log statements (consider reducing for production) |
Skipped in this environment (tools not installed): jshint, xmlstarlet, php, pwsh. Run locally with npm run review and install tools for full validation.
- VERSION, package.json, and
@versionin JS/CSS/HTML (html/index.html, js/*.js, css/page-editor.css, web-app/index.php, web-app/common.inc.php) are 1.1.0. - README.md was updated from 1.0.0 to 1.1.0 in this review.
- debian/ and some web-app PHP (e.g. saveFile.php, logout.php, authGetFile.php) still have older version strings; update when cutting packages or if you standardize versions.
- changePage / save on advance (nw-app): When the user changes page, if there are unsaved changes the app calls
saveFile(loadFile)with no confirm. Matches “automatically save on image advance” and is consistent. - restoreEditorUIOnLoad: Correctly registered as first
onLoadcallback in page-editor.js; page-canvas calls it aftermode.current(). nw-app comment correctly says not to call it again in apponLoad. - Drawer state: Debounced
saveDrawerStateplussaveDrawerStateNow()on shortcuts and before unload is coherent; Create mode and other options persist across document loads. - Toasts:
showFileExpectedToastin nw-app is non-blocking and auto-dismisses; no duplicate handlers found. - Modal close: Readme and shortcuts modals use
.closeand#readme-contentin both html/index.html and web-app/index.php; CSS keeps the close button visible.
- Arrow keys (Left/Up, Right/Down): Bound to prev/next page in nw-app.js only. They are removed in web-app.js (per branch diff). KEYBOARD-SHORTCUTS.md documents them without “desktop only”.
- Suggestion: Either restore arrow key bindings in web-app.js for parity, or add a note in KEYBOARD-SHORTCUTS.md that arrow-key page navigation is desktop-only.
- bin/visual-page-editor: Path cache (
~/.cache/visual-page-editor/nw-path), absoluteAPP_PATH, and--nwapp=$APP_PATHon macOS are consistent; launch args useNW_LAUNCH_ARGScorrectly. - DEBUG.md matches current behaviour (startup, cache, ETIMEDOUT, “Cannot open app.nw”).
- “Main” removed: Code and UI consistently use only “default” and “margin”; CSS and JS no longer reference
baseline-main. Legacymainin existing documents is still stripped by the regex insetBaselineType(e.g. page-canvas.js) where applicable. - Edit mode after create: Default is unchecked in index.html, test-example.html, web-app/index.php; behaviour matches.
- tsconfig.json (if present):
allowJs,noEmit: true,strict: falseare suitable for gradual adoption. - package.json:
typecheckandtsscripts and devDependencies are set up; runnpm run typecheckwhen adding or editing TS/JS.
- Automated review passes; only notable warning is
console.logcount. - Version and docs (including README) are aligned to 1.1.0.
- Behaviour of save-on-advance, drawer state, toasts, and modals is consistent; no logic issues found.
- One optional improvement: clarify or restore arrow-key page navigation in the web app and/or KEYBOARD-SHORTCUTS.md.