feat(reader): implement FEAT-01 Focus Zen Mode (100% vh/vw, auto-hiding HUD, hotkeys F/Esc, native fullscreen)

This commit is contained in:
Antigravity committed 2026-10-08 10:45:09 +03:00
1 parent 9bbc9473de
commit f10965eff5
13 files changed
+3157 -792

No files matched your search

+14
View File
@@ -331,6 +331,8 @@ def _migrate(conn: sqlite3.Connection):
title TEXT NOT NULL,
subtitle TEXT DEFAULT '',
golden_formula TEXT NOT NULL,
cheatsheet_table TEXT DEFAULT '',
detailed_notes TEXT DEFAULT '',
contrast_explanation_json TEXT NOT NULL,
journaling_prompt TEXT NOT NULL,
exercises_json TEXT NOT NULL,
@@ -340,6 +342,18 @@ def _migrate(conn: sqlite3.Connection):
conn.execute("CREATE INDEX IF NOT EXISTS idx_grammar_units_num ON grammar_units(unit_num);")
conn.execute("CREATE INDEX IF NOT EXISTS idx_grammar_units_level ON grammar_units(level);")
# Safe migration: add cheatsheet_table and detailed_notes columns if not present
existing_grammar_cols = {
row[1] for row in conn.execute("PRAGMA table_info(grammar_units)").fetchall()
}
grammar_migrations = [
("cheatsheet_table", "TEXT DEFAULT ''"),
("detailed_notes", "TEXT DEFAULT ''"),
]
for col, definition in grammar_migrations:
if col not in existing_grammar_cols:
conn.execute(f"ALTER TABLE grammar_units ADD COLUMN {col} {definition}")
conn.execute("""
CREATE TABLE IF NOT EXISTS grammar_progress (
id INTEGER PRIMARY KEY AUTOINCREMENT,