Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
7b0a40c
feat: add chapter detection plan and pnpm workspace configuration
chaxus Jul 16, 2026
c986090
feat: add rule-based txt chapter detection (P1)
chaxus Jul 16, 2026
10f8f4a
feat: add browser NLP inference infrastructure (P2)
chaxus Jul 16, 2026
15280b6
feat: chapter cache persistence and detection confidence (P4 partial)
chaxus Jul 17, 2026
9dd70f0
fix: catalogue first entry jumped past the opening page
chaxus Jul 17, 2026
9aaed40
feat: add ml/ training pipeline for chapter-title model (P3)
chaxus Jul 17, 2026
fbc4d0a
chore: add train smoke-test flag and pin python 3.11/3.12
chaxus Jul 17, 2026
ece69b5
feat: negative subsampling on train split to fix class imbalance
chaxus Jul 17, 2026
b447efc
fix: stabilize DeBERTa-v3 training (batch 16, tunable lr, eval subsam…
chaxus Jul 17, 2026
d622507
feat: English txt weak-supervision + threshold sweep tool
chaxus Jul 18, 2026
0ba557a
feat: format features for title detection (shared Python/JS impl)
chaxus Jul 18, 2026
3fd8fb6
test: independent generalization eval on untrained Chinese txts
chaxus Jul 18, 2026
feca845
docs: chapter detection journey — process, pitfalls, lessons
chaxus Jul 18, 2026
f5e8a44
fix: correct formatting inconsistencies in chapter detection document…
chaxus Jul 18, 2026
2b43d1f
docs: expand chapter-detection journey (decision narrative + engineer…
chaxus Jul 18, 2026
076b552
docs: fill independent-test result (recall 0.988 on zero-contact books)
chaxus Jul 18, 2026
4766d1a
docs: browser deployment plan for the chapter model (lazy-load/chunk/…
chaxus Jul 18, 2026
d9be44b
fix: charset detection + anchored literary-phrase weak labeling
chaxus Jul 18, 2026
ef92b28
docs: v2->v3 investigation — aggregate metrics hid flagship failure
chaxus Jul 18, 2026
6416405
docs: v3 milestone — best model, honest capability boundary
chaxus Jul 18, 2026
ec72f13
feat: wire v3 model into browser worker; hit DeBERTa-v3 quant wall
chaxus Jul 18, 2026
3cfbffa
docs: record per-language model direction; update all docs to current…
chaxus Jul 18, 2026
70646aa
feat: train.py --base for per-language models
chaxus Jul 18, 2026
5bf14a1
docs: per-language architecture validated — Chinese model int8 works
chaxus Jul 18, 2026
00807b9
feat: wire per-language model into chapter detection (browser e2e pro…
chaxus Jul 18, 2026
b90ec93
feat: AI-enhance catalogue UI — confidence-gated model enhancement
chaxus Jul 18, 2026
46047db
feat: English chapter-title model (distilbert int8 67MB), register en
chaxus Jul 18, 2026
bb1e83b
docs: record per-language model lessons (Chinese + English)
chaxus Jul 18, 2026
e244380
fix: correct spacing in chapter detection documentation and deploymen…
chaxus Jul 18, 2026
ef31138
refactor: remove unused components and styles from BookCard, Catalogu…
chaxus Jul 19, 2026
326118e
feat: Refactor UI layer to use ranui design system, replacing React a…
chaxus Jul 19, 2026
e7d7e52
refactor: remove unused PostCSS configuration and update TypeScript s…
chaxus Jul 19, 2026
a067dd8
chore: update pnpm workspace configuration and service work version
chaxus Jul 19, 2026
fd2574e
refactor: remove unused SCSS file for book detail animations
chaxus Jul 19, 2026
17ec00c
chore: update ranui to version 0.2.1-alpha.4 and refactor book detail…
chaxus Jul 19, 2026
0432b6f
feat: complete visual redesign and enhance user experience
chaxus Jul 19, 2026
662ce8d
feat: enhance service worker caching strategy and model prefetching
chaxus Jul 19, 2026
34088e2
chore: update service worker version to 1784443046
chaxus Jul 19, 2026
0e63c57
feat: enhance chapter detection and editing capabilities
chaxus Jul 19, 2026
b4f3f27
feat: implement pagination worker for efficient text processing and U…
chaxus Jul 19, 2026
a3c1a0f
refactor: remove paging worker and related code; implement chapter de…
chaxus Jul 19, 2026
7e2bae7
feat: implement reading progress storage and restoration for seamless…
chaxus Jul 19, 2026
7d62894
feat: enhance chapter detection and reading progress features with mo…
chaxus Jul 19, 2026
dcfcad8
feat: update chapter regeneration functionality and enhance UI text f…
chaxus Jul 19, 2026
396cf9a
feat: add reading settings panel and typography adjustments
chaxus Jul 19, 2026
409bae2
feat: implement notes panel with highlighting and note management fea…
chaxus Jul 19, 2026
b9fbf13
feat: enhance notes panel and popover functionality with improved sta…
chaxus Jul 19, 2026
da8123f
feat: enhance catalogue toolbar layout and improve chapter detection …
chaxus Jul 19, 2026
f5be010
feat: improve code formatting and enhance readability across multiple…
chaxus Jul 19, 2026
47c48b1
feat: improve code formatting for better readability across multiple …
chaxus Jul 19, 2026
7f5b3dd
feat: adjust margin and padding for improved layout and spacing in ca…
chaxus Jul 19, 2026
b669eed
feat: enhance viewport settings and improve layout handling for safe …
chaxus Jul 19, 2026
8ddd57e
feat: improve keyboard navigation and enhance layout for safe areas
chaxus Jul 19, 2026
7438d2a
fix: correct spacing in documentation comment for chapter source expl…
chaxus Jul 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ dist
report
# tesseract
*.traineddata
public/models/
44 changes: 44 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"ignorePatterns": ["dist/**", "report/**", "assets/**", "temp/**", "public/**", "cache/**", "**/*.snap"],
"plugins": ["typescript", "import", "node"],
"categories": {
"correctness": "error"
},
"env": {
"es2022": true,
"node": true,
"browser": true
},
"rules": {
"eqeqeq": "off",
"no-debugger": "error",
"no-empty": ["warn", { "allowEmptyCatch": true }],
"prefer-const": ["warn", { "destructuring": "all" }],
"typescript/no-explicit-any": "off",
"typescript/no-namespace": "off",
"typescript/no-inferrable-types": "off",
"no-unused-vars": "off",
"typescript/no-unused-vars": [
"error",
{
"args": "all",
"argsIgnorePattern": "^_",
"caughtErrors": "all",
"caughtErrorsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
"import/no-duplicates": "error"
},
"overrides": [
{
"files": ["**/__tests__/**", "**/*.test.ts", "docs/**", "ml/**"],
"rules": {
"no-console": "off"
}
}
]
}
59 changes: 59 additions & 0 deletions app.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import { createRoot } from 'ranui/builder';
import { ROUTE_PATH, resolveRoute } from '@/router';
import { closeDB, initDB, resumeDB } from '@/store';
import { renderBookDetail } from '@/pages/book-detail';
import { renderHome } from '@/pages/home';
import { renderLoading } from '@/components/Loading';
import '@khmyznikov/pwa-install';
import '@/styles/view-transition.scss';

/** 命令式创建 pwa-install(原 React useEffect 里的逻辑,`/weread/` 字面量保持不变)。 */
const createPwaInstall = (): (() => void) => {
const pwaInstall = document.createElement('pwa-install');
pwaInstall.setAttribute('manifest-url', '/weread/manifest.json');
pwaInstall.setAttribute('name', 'weread');
pwaInstall.setAttribute('description', 'Progressive web application');
pwaInstall.setAttribute('icon', '/weread/read.svg');
document.body.appendChild(pwaInstall);
return () => document.body.removeChild(pwaInstall);
};

/**
* 客户端挂载:按 pathname 选页,在 `createRoot` 里构建并替换 #app 的 light DOM
* (自定义元素 upgrade 时复用 server 侧 shadow root)。含 DB / PWA / 可见性生命周期。
*/
export const mountApp = (): void => {
initDB();
const removePwa = createPwaInstall();
const onVis = (): void => {
if (document.visibilityState === 'visible') resumeDB();
};
document.addEventListener('visibilitychange', onVis, false);

const container = document.getElementById('app');
if (!container) return;
const route = resolveRoute(location.pathname);

const dispose = createRoot((d) => {
// 页面工厂必须在 createRoot 内调用,signal 绑定 / onCleanup 才有 owner
const node =
route === ROUTE_PATH.BOOK_DETAIL
? renderBookDetail()
: route === ROUTE_PATH.LOADING
? renderLoading()
: renderHome();
container.replaceChildren(node.build());
return d;
});

window.addEventListener(
'pagehide',
() => {
dispose?.();
closeDB();
removePwa();
document.removeEventListener('visibilitychange', onVis);
},
{ once: true },
);
};
43 changes: 0 additions & 43 deletions app.tsx

This file was deleted.

Loading
Loading