Skip to content

fix: say which files import, and stop a busy port from hiding the library - #5

Merged
zuhairhalawa merged 1 commit into
mainfrom
fix/first-run-clarity
Oct 23, 2026
Merged

zuhairhalawa merged 1 commit into
mainfrom
fix/first-run-clarity

Conversation

@zuhairhalawa

Copy link
Copy Markdown
Owner

Three first-run problems a new user would hit, found by reading and running the repository.

Wrong file message. It said "Only PowerPoint (.pptx) files can be imported", but the picker and the code accept .pptx, .pptm, .ppsx and .potx, and the import list and parseFile worded the old-.ppt case differently. One rejectionMessage() now serves both and names every accepted extension. The new unit tests were written first and failed before the change.

Busy port hides the library. The library is in IndexedDB, scoped to the exact address. If port 5173 was busy, Vite quietly moved to another port and the student saw an empty library. server.strictPort makes it stop with an error (the e2e config already uses --strictPort for preview). Checked by starting a second dev server: "Port 5173 is already in use"; --port still overrides.

README. Says where the data lives and that pnpm dev does not send the production security headers (pnpm build then pnpm preview does).

Checked locally: tsc -b --noEmit, unit tests (612 passing: 608 existing plus 4 new), the study-flow browser spec in Chrome (3 passed), scan-secrets.

…rary

Three first-run problems a new user would hit:

- The rejection message for a wrong file said "Only PowerPoint (.pptx)
  files can be imported" although the file picker and the code accept
  .pptx, .pptm, .ppsx and .potx, and the import list and parseFile worded
  the old-.ppt case differently. One rejectionMessage() now serves both and
  names every accepted extension. New unit tests (written first, failing)
  cover the accepted extensions, the wording and parseFile; the browser test
  string is updated.
- The library lives in IndexedDB, which is scoped to the exact address. If
  port 5173 was busy, Vite quietly moved to another port and the student saw
  an empty library. server.strictPort makes it stop with an error instead
  (checked by starting a second dev server; --port still overrides).
- The README now says where the data lives and that pnpm dev does not send
  the production security headers (pnpm build and pnpm preview does).

Co-Authored-By: Claude <noreply@anthropic.com>
@zuhairhalawa
zuhairhalawa merged commit d53c8f6 into main Oct 23, 2026
3 checks passed
zuhairhalawa added a commit that referenced this pull request Oct 23, 2026
Brings in studyai #4 (FSRS version, unwired Claude arrow, stale test title)
and #5 (shared file-rejection message, strict dev port, README notes).

One conflict, in vite.config.ts: main added a `server` block to the old
object-literal config while this branch turned the config into a function
of the mode. Resolved by keeping the function form and carrying the strict
dev-port block (port 5173, strictPort) into it, so it applies to the
regular and the demo dev servers alike. docs/ARCHITECTURE.md and
docs/DECISIONS.md merged without conflict and were read afterwards: the
corrected diagram and ADR-012 correction from main sit alongside this
branch's src/demo row and ADR-037.

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant