Skip to content

Commit fe99aa8

Browse files
committed
docs: polish repo and app copy
1 parent 2bc9fac commit fe99aa8

15 files changed

Lines changed: 63 additions & 75 deletions

QA.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# QA Checklist
22

3-
Use this for browser smoke checks after changes that touch UI, imports, reader modes, persistence, or app shell state.
3+
Use this after changes that touch UI, imports, reader modes, persistence, or app shell state.
44

55
## Automated First
66

@@ -33,20 +33,20 @@ Open `http://localhost:3000`.
3333
- PDF: import a text PDF and verify progress messaging reaches the reader.
3434
- PDF cancel: cancel a PDF import mid-process and confirm the app returns to idle without a generic error.
3535
- URL success: import a normal article URL and confirm the cleanup preview appears before loading.
36-
- URL blocked: import a challenge-heavy URL and confirm fallback actions appear (`Open Source Page`, `Paste from Clipboard`).
36+
- URL blocked: import a URL that hits a bot check or login wall and confirm fallback actions appear (`Open Source Page`, `Paste from Clipboard`).
3737
- Forum URL: verify RSVP does not surface giant URL-like tokens after cleanup.
3838

3939
## Persistence
4040

4141
- Save a book, leave it, reopen it, and verify progress is restored.
4242
- Change reader mode and Bionic settings, reopen the book, and verify settings persist.
4343
- Change theme, refresh, and verify selected theme persists.
44-
- Edit imported text and confirm the library source badge does not silently downgrade to `Paste`.
44+
- Edit imported text and confirm the library source badge stays accurate.
4545

4646
## Notes, Bookmarks, And Session Recap
4747

4848
- Add a bookmark and a note, close/reopen the panel, and verify local panel search/edit UI resets cleanly.
49-
- Finish a meaningful reading session and verify the session recap does not auto-open.
49+
- Read long enough to create a session recap, then verify the recap does not auto-open.
5050
- Confirm the manual session recap button appears only when the active book has recap data.
5151

5252
## Mobile Layout

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Flow Reader
22

3-
Flow Reader is a local-first reading workspace for moving through long text with speed, focus, and control. It combines RSVP, Bionic Flow, document imports, themes, bookmarks, notes, and session summaries in a polished browser app.
3+
Flow Reader helps you read long articles, PDFs, notes, and saved text in the browser. It gives you RSVP, Bionic Flow, imports, themes, bookmarks, notes, and session recaps without sending your library anywhere.
44

55
Everything is stored locally in your browser (no accounts, no sync).
66

@@ -10,9 +10,9 @@ https://m3rcu3y.github.io/Flow-Reader/
1010

1111
## Features
1212

13-
- RSVP word-by-word reading with smart timing and comfort controls.
14-
- RSVP+ for context-enhanced reading on desktop and landscape layouts.
15-
- Bionic Flow for scrollable, focused reading with progress-aware navigation.
13+
- RSVP word-by-word reading with adjustable speed and pauses.
14+
- RSVP+ shows nearby words for more context on wider screens.
15+
- Bionic Flow gives you scrollable reading that keeps progress in sync.
1616
- PDF import with text extraction, password handling, cancellation, and OCR fallback for scanned pages.
1717
- DOCX, TXT, pasted text, and article URL import.
1818
- URL cleanup preview for removing page chrome, forum noise, references, and long raw links.
@@ -24,7 +24,7 @@ https://m3rcu3y.github.io/Flow-Reader/
2424
## Project Map
2525

2626
- App source lives in `src/`.
27-
- Future agents should start with `docs/CODEMAP.md` for the codebase tour.
27+
- Start with `docs/CODEMAP.md` for the codebase tour.
2828
- Development commands and environment notes live in `docs/DEVELOPMENT.md`.
2929
- Import behavior is documented in `docs/IMPORT_PIPELINE.md`.
3030
- Manual verification flows live in `QA.md`.

docs/CODEMAP.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Flow Reader Codemap
22

3-
This is the high-signal map for future agents. Read this before changing behavior.
3+
Use this as the quick map before changing app behavior.
44

55
## Entry Points
66

7-
- `index.html` owns document metadata, font/CDN scripts, Tailwind runtime config, and the PDF.js worker bootstrap.
7+
- `index.html` sets document metadata, font/CDN scripts, Tailwind runtime config, and the PDF.js worker bootstrap.
88
- `src/index.tsx` mounts React, installs the PWA service worker, imports global styles, and wraps the app in `ErrorBoundary`.
9-
- `src/App.tsx` is the main shell and state coordinator. It owns the active book, library list, reader mode, chrome visibility, session summaries, keyboard shortcuts, sprint timers, and most cross-component callbacks.
10-
- `src/styles.css` owns global CSS variables, scrollbar styling, idle backdrop animation classes, and motion reduction behavior.
9+
- `src/App.tsx` is the main shell and state coordinator. It handles the active book, library list, reader mode, chrome visibility, session summaries, keyboard shortcuts, sprint timers, and most cross-component callbacks.
10+
- `src/styles.css` contains global CSS variables, scrollbar styling, idle backdrop animation classes, and motion reduction behavior.
1111

1212
## Source Layout
1313

@@ -29,7 +29,7 @@ This is the high-signal map for future agents. Read this before changing behavio
2929

3030
### Reading Modes
3131

32-
- `src/hooks/useRSVP.ts` parses text into words and owns RSVP playback timing.
32+
- `src/hooks/useRSVP.ts` parses text into words and handles RSVP playback timing.
3333
- `src/components/RSVPReader.tsx` renders the focused single-word view.
3434
- `src/components/RSVPEnhancedReader.tsx` renders the context-enhanced RSVP view.
3535
- `src/components/BionicFlowReader.tsx` renders scrollable bionic reading and maps scroll position back to progress.
@@ -45,25 +45,25 @@ This is the high-signal map for future agents. Read this before changing behavio
4545

4646
### Notes, Bookmarks, And Sessions
4747

48-
- `src/components/BookmarksPanel.tsx` owns the bookmarks/notes panel UI.
48+
- `src/components/BookmarksPanel.tsx` handles the bookmarks/notes panel UI.
4949
- `src/services/sessionSummary.ts` builds session summaries.
5050
- `src/App.tsx` decides when a session is meaningful, persists summaries, and exposes the manual session recap action.
5151

5252
### Themes And Brand
5353

54-
- `src/services/themes.ts` owns preset/custom theme definitions and CSS variable application.
55-
- `src/components/ThemeSelector.tsx` owns the theme editor UI.
54+
- `src/services/themes.ts` contains preset/custom theme definitions and CSS variable application.
55+
- `src/components/ThemeSelector.tsx` handles the theme editor UI.
5656
- `src/components/IdleBackdrop.tsx` pairs with `src/styles.css` for the landing background.
5757
- `src/components/BrandMark.tsx`, `public/pwa-icon.svg`, and `public/pwa-maskable.svg` should stay visually aligned.
5858

59-
## Current Pressure Points
59+
## Places To Be Careful
6060

61-
- `src/App.tsx` is large and mixes app state, reading session lifecycle, global listeners, and layout chrome behavior. Safe future extractions: session lifecycle, reader chrome visibility, active-book mutations, and bionic hotspot behavior.
62-
- `src/components/TextInput.tsx` is large and mixes editor UI, import orchestration, URL preview, PDF password flow, and fullscreen editing. Safe future extractions: URL import hook, file import hook, password prompt, import progress UI, fullscreen editor.
63-
- Keep `pdfService.ts`, `urlImportService.ts`, `bookState.ts`, and `sessionSummary.ts` as examples for future service boundaries.
61+
- `src/App.tsx` is large and mixes app state, reading session lifecycle, global listeners, and layout chrome behavior. Good extraction targets: session lifecycle, reader chrome visibility, active-book mutations, and bionic hotspot behavior.
62+
- `src/components/TextInput.tsx` is large and mixes editor UI, import orchestration, URL preview, PDF password flow, and fullscreen editing. Good extraction targets: URL import hook, file import hook, password prompt, import progress UI, fullscreen editor.
63+
- Use `pdfService.ts`, `urlImportService.ts`, `bookState.ts`, and `sessionSummary.ts` as the service-boundary pattern for new import, persistence, or summary logic.
6464

6565
## Verification Pointers
6666

6767
- Run `npm run check` for TypeScript plus Vitest.
68-
- Use `QA.md` for browser smoke flows after UI, import, persistence, or reader-mode changes.
68+
- Use `QA.md` for browser checks after UI, import, persistence, or reader-mode changes.
6969
- Avoid relying only on static checks when touching layout or reader state machines.

docs/DEVELOPMENT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ npm run build
3636

3737
## Environment Notes
3838

39-
- The app is local-first. Library entries, preferences, themes, and summaries are stored in browser localStorage.
39+
- Library entries, preferences, themes, and summaries are stored in browser localStorage.
4040
- PDF parsing depends on PDF.js loaded from CDN in `index.html`.
4141
- OCR fallback uses `tesseract.js`.
4242
- DOCX import uses `mammoth`.
@@ -46,6 +46,6 @@ npm run build
4646
## Source Conventions
4747

4848
- Keep app code under `src/`.
49-
- Prefer service modules for pure or side-effect-isolated logic.
49+
- Prefer service modules for pure logic and browser-storage wrappers.
5050
- Prefer focused components/hooks over adding more responsibilities to `App.tsx` or `TextInput.tsx`.
5151
- Keep import and reading-mode changes covered by either Vitest or `QA.md` manual checks.

docs/IMPORT_PIPELINE.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Import Pipeline
22

3-
Flow Reader supports paste, TXT, PDF, DOCX, and URL imports. The import surface is intentionally local-first: imported text becomes a `Book`, and source provenance is stored on `Book.settings.sourceMeta`.
3+
Flow Reader supports paste, TXT, PDF, DOCX, and URL imports. Imported text becomes a `Book`, and source details are stored on `Book.settings.sourceMeta`.
44

55
## Entry Surface
66

7-
`src/components/TextInput.tsx` owns the import UI:
7+
`src/components/TextInput.tsx` handles the import UI:
88

99
- paste/manual text entry
1010
- TXT file reading
@@ -13,7 +13,7 @@ Flow Reader supports paste, TXT, PDF, DOCX, and URL imports. The import surface
1313
- URL import profile selection, cleanup preview, and blocked-page fallback
1414
- fullscreen editor
1515

16-
This file is a good candidate for future hook/component extraction, but behavior should stay covered by the QA flows before and after any split.
16+
If this file gets split into hooks or smaller components, run the related QA flows before and after the change.
1717

1818
## PDF
1919

@@ -47,9 +47,9 @@ The fixture-backed test is `src/services/urlImportService.test.ts`, using `src/s
4747

4848
For the ESP32 forum fixture, the cleaner should:
4949

50-
- keep core post content such as `I am trying to use multiple usb serial devices with ESP32-S3 host.`
51-
- keep readable context such as `I followed this reference, and also checked the example.`
52-
- remove forum chrome such as `ESP32 Forum`, `Board index`, `Quick links`, `FAQ`, `Login`, and `Register`
50+
- keep the main post content, including `I am trying to use multiple usb serial devices with ESP32-S3 host.`
51+
- keep useful context, including `I followed this reference, and also checked the example.`
52+
- remove forum chrome like `ESP32 Forum`, `Board index`, `Quick links`, `FAQ`, `Login`, and `Register`
5353
- remove reference definitions like `[1]: https://...`
5454
- avoid giant URL-like RSVP tokens
5555

index.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
1414
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Merriweather:wght@300;400;700;900&family=Playfair+Display:wght@400;600;700&display=swap" rel="stylesheet">
1515

16-
<!-- Tailwind CSS -->
1716
<script src="https://cdn.tailwindcss.com"></script>
1817
<script>
1918
tailwind.config = {
@@ -42,7 +41,6 @@
4241
<!-- PDF.js for parsing PDFs -->
4342
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.min.js"></script>
4443
<script>
45-
// Initialize PDF.js worker
4644
if (window.pdfjsLib) {
4745
window.pdfjsLib.GlobalWorkerOptions.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.worker.min.js';
4846
}

src/App.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ export default function App() {
114114
const bionicHintFadeRef = useRef<number | null>(null);
115115
const bionicHintHideRef = useRef<number | null>(null);
116116

117-
// Initialize library
118117
useEffect(() => {
119118
setLibrary(getLibrary());
120119
}, []);
@@ -214,7 +213,6 @@ export default function App() {
214213
saveBook(newBook);
215214
setLibrary(getLibrary());
216215
setActiveBook(newBook);
217-
// Enter Focus Mode
218216
setIsSidebarOpen(false);
219217
};
220218

@@ -246,7 +244,6 @@ export default function App() {
246244
}
247245
setActiveBook(nextBook);
248246
setResumePromptBook(null);
249-
// Enter Focus Mode
250247
setIsSidebarOpen(false);
251248
};
252249

@@ -266,7 +263,6 @@ export default function App() {
266263
setLibrary(getLibrary());
267264
}
268265
setActiveBook(null);
269-
// Return to Dashboard View
270266
setIsSidebarOpen(true);
271267
};
272268

@@ -439,10 +435,8 @@ export default function App() {
439435
return slice ? `“${slice}…”` : '';
440436
};
441437

442-
// Toggle Sidebar manually
443438
const toggleSidebar = () => setIsSidebarOpen(!isSidebarOpen);
444439

445-
// RSVP Hook
446440
const rsvp = useRSVP({
447441
initialText: activeBook?.text,
448442
initialIndex: activeBook?.progressIndex,
@@ -1456,7 +1450,6 @@ export default function App() {
14561450
</div>
14571451
</aside>
14581452

1459-
{/* 2. RIGHT MAIN STAGE */}
14601453
<main className="flex-1 h-full min-h-0 relative flex flex-col bg-app-bg">
14611454

14621455
{/* Top Floating Toggle (Visible when sidebar is closed) */}
@@ -1591,8 +1584,8 @@ export default function App() {
15911584
type="button"
15921585
onClick={() => setIsSessionRecapOpen(true)}
15931586
className="h-9 px-3 flex items-center justify-center gap-2 rounded-lg bg-black/30 border border-text-primary/5 text-text-secondary hover:text-text-primary hover:border-text-primary/20 transition-colors text-xs font-semibold uppercase tracking-widest"
1594-
aria-label="Session review"
1595-
title="Session review"
1587+
aria-label="Session recap"
1588+
title="Session recap"
15961589
>
15971590
<ChartColumn className="w-3.5 h-3.5" />
15981591
<span className="hidden sm:inline">Session</span>

src/components/ControlCenter.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ export const ControlCenter: React.FC<ControlCenterProps> = ({
6666
return () => window.clearInterval(t);
6767
}, [sprintEndsAt]);
6868

69-
// Calculate remaining time
7069
const currentWordNumber = total > 0 ? Math.min(progress + 1, total) : 0;
7170
const wordsLeft = Math.max(0, total - progress);
7271
const minutesLeft = Math.ceil(wordsLeft / wpm);
@@ -173,7 +172,7 @@ export const ControlCenter: React.FC<ControlCenterProps> = ({
173172
onClick={() => {
174173
const next = !comfortModeEnabled;
175174
onComfortModeChange?.(next);
176-
if (next) showToast('Comfort mode on: ramps up smoothly and eases after rewinds.');
175+
if (next) showToast('Comfort mode on: starts gently and slows down after rewinds.');
177176
}}
178177
className={`inline-flex items-center gap-2 px-3 py-2 rounded-full border transition-colors cursor-pointer select-none focus-visible:outline-none focus-visible:border-accent-red/60 focus-visible:shadow-glow ${
179178
comfortModeEnabled

src/components/ErrorBoundary.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundarySt
1717
}
1818

1919
componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {
20-
// Keep a breadcrumb in the console for debugging; UI stays user-friendly.
20+
// Keep crash details in the console for debugging.
2121
console.error('Flow Reader crashed:', error, errorInfo);
2222
this.setState({ error, errorInfo });
2323
}
@@ -47,7 +47,7 @@ export class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundarySt
4747
</button>
4848
</div>
4949

50-
{/* Keep details available for devs without overwhelming normal users. */}
50+
{/* Expose stack details behind a collapsed disclosure. */}
5151
<details className="mt-5 text-xs text-text-secondary/80">
5252
<summary className="cursor-pointer select-none">Error details</summary>
5353
<pre className="mt-2 whitespace-pre-wrap break-words bg-black/20 border border-text-primary/10 rounded-lg p-3">

src/components/HelpOverlay.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export const HelpOverlay: React.FC<HelpOverlayProps> = ({
108108
<section className="rounded-xl border border-text-primary/10 bg-black/15 p-4 sm:p-5">
109109
<div className="flex items-center gap-2 text-sm font-bold text-text-primary">
110110
<MousePointer2 className="w-4 h-4 text-text-secondary" />
111-
Bionic Mode (Zen UI)
111+
Bionic mode controls
112112
</div>
113113
<p className="mt-2 text-sm text-text-secondary">
114114
In Bionic mode, the UI stays hidden by default. Reach for it when you need it:

0 commit comments

Comments
 (0)