Skip to content

V5(development) - #3

Open
astraldev wants to merge 37 commits into
mainfrom
v5(development)
Open

astraldev wants to merge 37 commits into
mainfrom
v5(development)

Conversation

@astraldev

@astraldev astraldev commented Jun 14, 2026 •

Copy link
Copy Markdown
Owner

v5

Rewrite of GGate (formerly GLogic) onto GTK 4 / libadwaita. New simulation playback,
a themed component icon set, runtime theming, a meson build, and CI/packaging.

Runtime / platform

  • GTK 4 + libadwaita app with a Cairo-rendered canvas. Requires Python >=3.10,
    GTK >=4.16, libadwaita >=1.6.8. Runtime deps: pygobject, pycairo, python-igraph,
    shapely, packaging.
  • App id org.astralco.ggate (.Dev in the development profile).
  • Dialogs moved to libadwaita equivalents (Adw.Dialog, Adw.AlertDialog, Adw.HeaderBar).

Simulation engine + playback

  • The simulation now runs in two phases. First it computes the whole run to completion in
    small background slices so the UI stays responsive, recording every timestep
    (CircuitManager.begin_compute/compute_slice, frames in component_state_history).
    Then it plays those recorded frames back — playback never re-runs the engine.
  • Playback lives in its own class, CircuitPlaybackAnimation. It owns the transport state
    (computing → playing ⇄ paused → ended/idle) and the play/pause/restart/seek/stop actions.
    CircuitManager stays the engine and data layer.
  • Playback speed targets a total duration rather than a fixed frame delay, clamped to a
    16–200 ms/frame range. The target is a new "Animation duration" preference.
  • Circuits that don't change over time (e.g. no oscillator) skip playback and just show the
    final state; the playback bar doesn't appear for them.
  • Editing a property or flipping a switch mid-run throws away the recorded run and recomputes
    from the start with the new value (MainFrame.recompute_simulation), so what you see always
    matches the current circuit. A switch keeps its toggled state across that recompute.
  • The original synchronous run path is still available for non-GUI use.

UI

  • New floating playback bar (PlaybackControls). DrawArea changed from a scrolled window
    into an overlay that wraps the scroller, so the bar stays pinned over the canvas while the
    content scrolls underneath. Controls: Stop · Restart · Play/Pause, then a seek slider and a
    fixed-width time readout that doesn't jitter as it updates. The bar's Stop ends the run.
    The header simulation control is now just Play/Stop.
  • Component sidebar with search and categories.
  • Preferences rebuilt as an Adw.PreferencesDialog (Appearance / Simulation / Canvas);
    its widgets are built once and reused.
  • Timing diagram rebuilt as a dialog with scale/range/save controls, scroll-synced panes,
    drag-to-scrub, theme-aware waveforms, and a warning when the diagram hits Cairo's width limit.

Theming + icons

  • Built-in light and dark themes (Classic, Space, Frappé, Mocha) defined as JSON in
    data/themes/ and loaded at runtime; switchable from Preferences (logic in Themes.py).
  • Hand-drawn component icons in two symbol sets (ANSI and IEC); icon spec documented in
    data/images/components/spec.md.

Build / packaging / CI

  • meson build (resource compile, install, generated config.py, desktop + AppStream files).
    In development, run.py regenerates and registers the dev resource bundle on each launch so
    it can't go stale.
  • GitHub Actions (Fedora container) produce a meson dist tarball; flatpak/snap/deb workflows
    run only on releases. Version unified to 5.0.0.

Docs / assets

  • README (requirements, run steps, screenshots, v1→v5 history), NEWS 5.0.0, INSTALL, TODO.
  • gallery/: screenshots captured by build-aux/capture_screenshots.py (themes, playback,
    timing, preferences, properties) and a 1080p demo clip produced by build-aux/make_demo.sh.

Notable fixes

  • Oscillators now produce timing history.
  • Unconnected input pins no longer crash the simulator.
  • .glc files load their property values with the correct types.
  • libadwaita styling, property-dialog behaviour, running-mode crashes, first-paint centering,
    and a zoom clamp (0.5–20).

Known / deferred

  • pytest and its config are present but there is no tests/ directory yet.
  • Long playbacks run past the target duration (no frame subsampling); there's no playback speed
    control beyond the duration preference, and no progress indicator during compute.
  • Switch toggles during a run aren't recorded in undo history and don't mark the file modified.

astraldev and others added 30 commits July 20, 2025 05:22
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…n, and centering

Chain do_startup to Adw.Application so the Adwaita stylesheet loads; fix the
PropertyWindow API drift (show_properties, Adw row signals, float SpinRow,
group builder), the AlertDialog close crash, the simulation net_levels
IndexError, and context-menu positioning. Add canvas content/resize centering
with a Preferences toggle. Update .agents backlog, CLAUDE.md, and document
Properties.py.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Chain do_startup to Adw.Application so the Adwaita stylesheet loads. Property
dialog uses Adw.ToolbarView with a working close, guarded dismiss(), no combo
search, no redundant group label. Clipboard read handles empty/no-text. Single
click selects, double click opens properties. Fix running-mode crashes: guarded
prop_window close, timing-diagram toggle uses the real attribute, and
Diagram.draw() int-casts cairo surface dims, registers draw funcs, and fixes
cursor/undefined-attribute bugs. Update .agents backlog.

Co-Authored-By: Gemini <noreply@google.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…e About

ComponentView is now a searchable, category-grouped sidebar with ALL-CAPS gate
names, navigation-sidebar styling, container padding, and no search auto-focus.
Wire the About dialog (AboutGGate.create + present) which previously did
nothing. Add planning docs for the preferences revamp and component-movement
animation under .agents/plans/.

Co-Authored-By: Gemini <noreply@google.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…d window

Rewrite Preferences as an Adw.PreferencesDialog (instant-apply) with an
Appearance page (style + all color groups), Simulation, and Canvas pages;
monospace-restricted font picker and ColorDialogButtons. Animate component
movement (ease-out glide on the visual layer, model stays grid-snapped). Size
the main window to 65%x60% of the monitor via a helper. Add the no-deep-nesting
convention to CLAUDE.md.

Co-Authored-By: Gemini <noreply@google.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add missing os/Gio imports to bin/ggate.in (installed launcher blocker). Bump
config.py/__init__.py version 4.0.0 -> 5.0.0 to match pyproject/meson. Use
config.APP_PREFIX (org.astralco.GGate) for the GApplication id and rename the
desktop file to match. Replace the non-portable shell __pycache__ exclusion in
meson.build with portable Python. Add the icon-creation plan doc.

Co-Authored-By: Gemini <noreply@google.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sweep of un-exercised paths: fix save_file_complete typo, Exporter statusbar
push()->update(), ComponentView set_selectable->set_sensitive (palette disabled
in sim), Gtk.MessageDialog->Adw.AlertDialog in on_circuit_alert, FileManager
classmethod, and stop-gap TimingGraph rendering (slated for a full revamp). Add
the theming plan and build-system backlog.

Co-Authored-By: Gemini <noreply@google.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Rewrite Display.py (Adw.Dialog + ToolbarView, scale/range/save toolbar)
and Diagram.py (synced scrolls, pure set_draw_func rendering, gesture
scrubbing, empty-history placeholder). Render the draw area from the
Preference color keys so it tracks the canvas theme; fix layout
expansion and unify row geometry. Exporter compatibility preserved.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Built-in themes (Classic, Space, Frappe, Mocha) ship as JSON in
data/themes, globbed into the gresource by Meson and discovered at
runtime by enumerating the resource dir (no hardcoded theme list).
Classic reproduces the legacy default palette and is the default.
Add Themes.py (registry, apply_theme, apply_chrome), a Theme picker
in Preferences with live recolor + Custom fallback, RGBA-alpha
round-trip in Preference, and StyleManager/accent chrome alignment.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add per-component visual specs to the icon plan; add a reusable
delegation brief (repo facts, conventions, build/gresource rules,
logic-level verification workflow) so delegations reference it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Load .glc property types correctly (parse_section), compute gates via
all/any/sum so unconnected pins don't IndexError, and run analyze_logic at
run start so oscillators populate the timing history. Rebuild the theme
ComboRow model from the registry so its dropdown isn't stuck on Custom, and
keep selections from reverting. Rename config.DEV_MODE to RUNNING_FROM_SOURCE
and drop docstrings/stale headers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
run.py regenerates and compiles dev-resources.gresource from the asset dirs
each launch so it can't go stale. Replace non-portable find|sed/inline-python
globbing with shell helpers, fix the prefix shadowing, and add a Fedora-based
GitHub Actions workflow that produces a meson dist tar.gz. Document the flow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Antigravity <noreply@antigravity.google>
Co-Authored-By: Antigravity <noreply@antigravity.google>
Co-Authored-By: Antigravity <noreply@antigravity.google>
Co-Authored-By: Antigravity <noreply@antigravity.google>
Co-Authored-By: Antigravity <noreply@antigravity.google>
Co-Authored-By: Antigravity <noreply@antigravity.google>
…ging

Bump actions (checkout@v5, action-gh-release@v3, upload-artifact@v7) and set the
Node-24 opt-in across all workflows. Gate flatpak/snap/deb to release; keep the
source-tarball Build Pipeline on push/PR. Add real Debian packaging under
build-aux/debian (debhelper + meson) with a Python generator that transpiles
CHANGELOG.md into a multi-entry debian/changelog at build time; add the 5.0.0
CHANGELOG entry. Consolidate AI docs to .agents (drop the .claude duplicate,
git-ignore .claude); scope the debian build-output ignores.

Co-Authored-By: Antigravity <noreply@antigravity.google>
astraldev and others added 7 commits June 14, 2026 23:59
Add hand-drawn ANSI/IEC component SVGs with a gresource->freedesktop
icon-theme layout, register the resource path at startup, and switch the
component palette and context menu to icon-name lookups. Fixes the
broken-icon regression caused by a duplicate do_startup that dropped the
icon resource path, and renders palette icons at full pixel size.

Co-Authored-By: agy (Antigravity/Gemini) <noreply@antigravity.google>
- README: click-to-play playback hero (-> gallery/ggate-demo.mp4), Screenshots
  section, v1->v5 history, accurate requirements/links
- NEWS 5.0.0; INSTALL.md from-source steps; root TODO roadmap; meson_options
  profile description
- gallery/: procedurally captured stills (themes, playback, timing, preferences,
  properties) + 1080p/30fps demo clip + index README
- build-aux/: add capture_screenshots.py + make_demo.sh and remove the dead,
  diverged scripts/generate-resources-xml.py (scripts/ folded into build-aux/)
- add pytest dev dependency + [tool.pytest.ini_options]

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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