Skip to content

feat(electron): overhaul the desktop app with bundled runtime and new logo - #13

Merged
Developer-Simon merged 21 commits into
masterfrom
feat/electron-overhaul
Oct 21, 2026
Merged

Developer-Simon merged 21 commits into
masterfrom
feat/electron-overhaul

Conversation

@Developer-Simon

Copy link
Copy Markdown
Owner

Squash-merge commit message

Rebuilds the Electron shell on small, tested modules and ships it as two
installer variants, on top of the src-layout package refactor.

- Package code moves to src/finance_mosaix; data paths follow
  FINANCE_MOSAIX_DATA_DIR.
- Electron main process: runtime resolution (override, dev, bundled,
  system Python), venv manager for the slim variant, Streamlit server with
  free port, health check and tree kill, smoke check, legacy data notice,
  custom title bar and i18n.
- Full variant bundles a relocatable python-build-standalone runtime.
- electron-builder configs for slim and full; CI builds, smoke-tests and
  releases installers on Linux, macOS and Windows.
- New Mosaik-M logo in the title bar, the Streamlit sidebar, app icons,
  docs and README; branding/build_logo.py regenerates every logo file.
- scripts/dev/create-pr.sh and merge-pr.sh with a filled PR template.
- streamlit>=1.46, numpy/pandas pins relaxed.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Summary

Electron overhaul (modular shell, slim/full installers, CI releases) on top of the src-layout refactor, plus the new Mosaik-M logo and PR tooling.

Checks

  • The title is a Conventional Commits subject.
  • No database files (*.duckdb) or local settings.json are tracked.
  • AI assistance disclosed per CONTRIBUTING.md: Claude Opus 5.5
  • Suites run locally: pytest, electron npm test
  • Linked issue: none

Developer-Simon and others added 21 commits September 6, 2026 17:44
Collapse the two top-level packages (src/, dashboard/) into a single
installable src/finance_mosaix package with core/ and dashboard/ subpackages.

- src/*.py            -> src/finance_mosaix/core/*.py
- dashboard/*.py      -> src/finance_mosaix/dashboard/*.py
- dashboard/import.py -> dashboard/import_view.py (was unimportable: keyword name)
- delete root __init__.py (the FinanceMosaix __path__ alias hack)

- replace every try/except ImportError dual-import block with absolute
  finance_mosaix.core.* / finance_mosaix.dashboard.* imports
- drop all sys.path hacks except one commented insert in dashboard/app.py
  (Streamlit runs that file by path, not as a module)
- fix __file__-relative repo-root depth (parents[1] -> parents[3]) in
  core query helpers, version.py; create_sample_database now writes to repo root
- pyproject: script -> finance_mosaix.core.finance_cli:main;
  packages.find where=["src"] include=["finance_mosaix*"]; Documentation URL main->master
- tests: absolute imports, no sys.path manipulation
- electron: main.js streamlit path, sync_version.js import, package.json
  extraResources (drop ../dashboard block), electron-package.yml path triggers
- docs: README quick start + finance-mosaix console script, architecture.md,
  cli.md, electron-python-runtime.md
- .gitignore: settings.json path, add /.docs/

Also folds in pre-existing uncommitted WIP that was entangled in the same
working tree: Linux/macOS venv setup notes (README.md, docs/installation.md),
dev-.venv Python detection in electron/main.js, electron/package-lock.json.

Verified: pytest 23 passed, compileall clean, CLI init/schema end-to-end,
start_dashboard app-path resolution, sync_version.js run.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Add core/paths.py as the single source for database, sample database and
settings locations. FINANCE_MOSAIX_DATA_DIR redirects all data files;
without it the previous repository locations are used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and tree kill

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port of the mailophant runtime builder without the pypff logic. Downloads
the pinned python-build-standalone archive, verifies its SHA-256, unpacks
it into electron/build/python and installs electron/build/requirements.txt
with an isolated environment, then checks the core imports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tpak ID

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The logo is an M of six tiles with a pink wedge, the wordmark
"financemosaix" is set in Sora and stored as paths.

- Electron title bar shows the logo instead of the plain title.
- Streamlit sidebar shows it on top via st.logo (light/dark variant by
  theme), the mark is the page icon and the collapsed-sidebar icon.
- App icons, docs favicon/avatar and the README use the new mark.
- branding/build_logo.py regenerates every logo file from the mark and
  the bundled Sora font (OFL).
- streamlit>=1.46 for st.logo and st.context.theme.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adapted from energy-node: the PR title is the squash subject, the fenced
block in the description is the squash body ending in a Claude trailer,
and merge-pr.sh merges with exactly that block.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Chirpy loads favicons from docs/assets/img/favicons, so the site still
showed the theme's default icons and docs/img/favicon.* were never used.
build_logo.py now writes the Chirpy favicon set there (svg, ico, 96 px,
apple touch and web app manifest icons on white), the unused files and
the unknown favicon key in _config.yml are gone, and PNGs are written
without timestamps so a rerun gives identical files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
electron-builder's extends concatenates arrays, so the full config
inherited the slim extraResources and listed them again. Every file was
copied twice in parallel, which fails on Windows with EBUSY. The full
config now only adds the bundled Python runtime.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pushes and pull requests now only run the tests. The installer matrix
runs on workflow_dispatch or when release-please calls the workflow with
a release tag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Developer-Simon
Developer-Simon merged commit ee196d5 into master Oct 21, 2026
6 checks passed
@Developer-Simon
Developer-Simon deleted the feat/electron-overhaul branch October 21, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant