Conversation
- Remove flatpak-builder-tools - Added a custom script to update deps - Update deps across the board - Improved type hints - Other minor changes
- Add packaging info - Fix word buttons not searching - Remove explicit "version" params
- Include wn as a subproject - Improve wordlist (completions) performance significantly (6 sec vs 0.3 sec) - Integrate db generation into build process - This means there's no hardcoded db file - No more db zst file as release asset either - Should also simplify distro packaging - Remove indirect dependency on httpx - Remove rich dep since it's now a build step rather than a dev-run script - Fix meson-based build (didnt notice it was broken)
- Not yet ready to ship IMO. - OEWN 2025+ doesnt have a GitHub asset yet. - This means builds and downloads are really slow right now.
- chore: Update copyright year - chore: Some restructuring
- Removed `ThreadPoolExecutor` - Remove threading entirely for wordnet init - Keep threading for wordlist
- Remove unnecessary idle_add - Remove unused parameter pass_check
There was a problem hiding this comment.
Pull request overview
This PR aims to make Wordbook fully offline by bundling a pre-built WordNet DB, extracting it locally on first run, and removing the in-app download flow.
Changes:
- Replace runtime WordNet downloading with local compressed DB installation + extraction/versioning.
- Introduce generated
constants.py+ build options to control DB installation and embed WN version hash. - Update UI/Flatpak/build tooling to support offline setup and remove network requirement.
Reviewed changes
Copilot reviewed 27 out of 28 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| wordbook/wordbook.in | Update copyright year. |
| wordbook/window.py | Replace download flow with DB setup/extraction and add completion optimizations. |
| wordbook/utils.py | Switch config filename to JSON and tighten logger typing. |
| wordbook/settings_window.py | Use shared constants for resource path and improve typing for parent window. |
| wordbook/settings.py | Read config path from utils.CONFIG_FILE (now .json). |
| wordbook/meson.build | Generate/install constants.py, install bundled wn code, add DB manager source. |
| wordbook/main.py | Use RES_PATH constant; reduce reliance on Gio.Application.get_default(). |
| wordbook/database.py | New DB manager to locate/extract versioned compressed DB files. |
| wordbook/constants.py | New central constants module (configured by Meson). |
| wordbook/base.py | Move constants out; set WN data dir by version; simplify async wordlist loading. |
| wordbook/init.py | Update copyright year. |
| subprojects/wn | Add wn as a git submodule. |
| scripts/generate-wn-db.py | New script to generate a compressed, distributable WordNet DB. |
| scripts/flatpak-wheel-gen.py | New helper to generate Flatpak wheel sources. |
| pyproject.toml | Add zstd backport dep, switch wn to local editable via uv, update versions. |
| meson_options.txt | Add build option to install the WordNet DB file. |
| meson.build | Derive wn_version from submodule; set up Meson devenv PYTHONPATH. |
| data/search_provider.in | Ensure search provider can import app modules and use versioned WN dir. |
| data/resources/ui/window.blp | Remove download + network-fail pages; add DB error page. |
| data/meson.build | Add target to generate/install versioned compressed DB during build. |
| build-aux/flatpak/flatpak-builder-tools | Remove flatpak-builder-tools submodule reference. |
| build-aux/flatpak/dev.mufeed.Wordbook.Devel.json | Remove network permission; update dependencies and add DB build/install step. |
| README.md | Update requirements and add “Building from Source” instructions. |
| .zed/settings.json | Remove editor-specific settings file. |
| .gitmodules | Replace flatpak tools submodule with subprojects/wn. |
| .github/workflows/codeql.yml | Bump CodeQL action from v3 to v4. |
| .github/workflows/CI.yml | Ensure CI checks out submodules. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Was not an issue in practice mostly - Update zstd in flatpak - Fix import issue in settings - Fix completions dual entries - Other minor fixes
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 27 out of 28 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 27 out of 28 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 27 out of 28 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Doesn't really matter since we use submodules and meson but eh, might as well.
Would fix #35