diff options
| author | Danilo M. <danix@danix.xyz> | 2026-05-05 10:53:58 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-05-05 10:53:58 +0200 |
| commit | 8c848803ae9c3001508f9e582453caff4d505dcc (patch) | |
| tree | 153e60c78c0d13eb727f45c363d43ddf39730b62 /HANDOFF.md | |
| parent | 54ad3e37c6e9d2242f932c192119dd6de64966cf (diff) | |
| download | publisher-master.tar.gz publisher-master.zip | |
Diffstat (limited to 'HANDOFF.md')
| -rw-r--r-- | HANDOFF.md | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -1,14 +1,17 @@ Who this is for: - Danilo is a developer and blogger running a bilingual (IT/EN) Hugo site at danix.xyz. He maintains a PyQt6 desktop app called my-publisher that centralizes his blog publishing workflow, and is continuing to extend it post-v1.4. + Danilo is a developer and blogger running a bilingual (IT/EN) Hugo site at danix.xyz. He maintains a PyQt6 desktop app called my-publisher that centralizes his blog publishing workflow, and is continuing to extend it post-v1.5. What we covered: - npm build integration was planned and implemented this session. The blog repo uses Tailwind CSS and npm run build compiles main.css to main.min.css. A new NpmWorker (workers/npm_worker.py) was created following the existing HugoWorker pattern: QObject + QProcess, emits log_line(str) and finished(bool). HugoPanel (ui/hugo_panel.py) was updated to sequence npm run build before starting hugo server when Avvia is clicked, and a new "Build CSS" button was added to allow manual Tailwind rebuilds while the server is already running. Button states are managed across four states: idle, building, running, rebuilding. All 34 tests pass. Changes were committed, pushed to master, and tagged v1.5. + Transart backend availability check was planned and implemented this session. Before starting a translation, the app now checks if the OLLAMA_HOST ollama backend is reachable. A new OllamaCheckWorker (workers/ollama_check_worker.py) was created as a QThread subclass that does a + blocking urllib.request.urlopen call to {host}/api/tags with a 4-second timeout. TranslationView.start_translation() was refactored to run this check first, storing the pending article, then either showing a QMessageBox.warning() popup (if unreachable) or calling the new + _start_worker() method (if reachable). A double-click guard prevents starting a second check while one is already running. The ollama_host field was added to the Config dataclass with a resolved_ollama_host() helper that falls back to the OLLAMA_HOST env var and then to http://localhost:11434. MainWindow passes ollama_host=self.config.ollama_host to TranslationView. Seven new tests were added. All 41 tests pass. Changes were committed, pushed to master, and tagged v1.6. What was confirmed: - NpmWorker follows the exact same QObject+QProcess pattern as HugoWorker. Sequential order was chosen: build completes before hugo starts. If build fails before hugo was ever started, the UI returns to idle state and Avvia is re-enabled. The blog repo package.json lives at the same path as config.blog_repo, so no new config fields were needed. Closing the app while hugo is running triggers stop_server() via closeEvent in main_window.py, which calls terminate() + waitForFinished(3000) on the QProcess. v1.5 is live on origin/master. + OllamaCheckWorker uses QThread (not QObject+QProcess) because it does a single blocking HTTP call, matching the GitWorker pattern. The /api/tags endpoint is the standard ollama health check. ollama_host defaults to empty string in Config, which resolves to the OLLAMA_HOST env var at call time (not at app start), so late-set env vars are picked up. Old config files without ollama_host load cleanly. The _retry() button re-runs start_translation() which re-checks the backend. All 41 tests pass. v1.6 is live on origin/master. Still in progress: Nothing was left open in this session. Next steps: - Remaining TODO items include: (1) transart backend availability check using OLLAMA_HOST — validate before translation starts or disable the translate button with a popup; (2) font size spinner in SetupDialog — add QSpinBox, save via Config.save(), re-apply with app.setFont(); (3) article editor language flag in the sidebar; (4) manage static pages in addition to articles.
\ No newline at end of file + Remaining TODO items include: (1) font size spinner in SetupDialog — add QSpinBox, save via Config.save(), re-apply with app.setFont(); (2) article editor language flag in the sidebar — add a visible flag/indicator so the user knows the language of the article being edited, useful + for empty drafts; (3) manage static pages in addition to articles.
\ No newline at end of file |
