Skip to content

[Feature] SQLite storage, python sims, web UI overhaul - #209

Merged
connorgallopo merged 157 commits into
mainfrom
shot-history
Oct 8, 2026
Merged

connorgallopo merged 157 commits into
mainfrom
shot-history

Conversation

@connorgallopo

@connorgallopo connorgallopo commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Description

What does this PR do?

Moves shots, settings and calibration into SQLite, swaps the C++ sim path for a Python sim layer (GSPro, E6, OGS), has the LM pull its config from the web server instead of CLI flags, and gives the web UI a full pass.

Why is this change needed?

JSON files and CLI flags were getting messy, sims were stuck in C++, and the UI had a pile of bugs and confusing flows for first-time setup.

Related Issue(s)

Changes Made

  • SQLite storage for sessions, shots, settings and calibration, with migrations and a one-time import of the old JSON files
  • Python sim layer: GSPro, E6 (auth via a small shared lib), OGS. Sims are now instances you add from the navbar with a test button and an on switch, multiple per type
  • LM gets its config over HTTP from the web server, dead CLI flags/env vars/config keys removed, every key the C++ reads is defined in configurations.json and tested
  • Calibration page is a checklist in order (strobe, lens, ball) with real done/redo state
  • Dashboard strip shows real LM state, setup checklist, cleaner navbar
  • Config page has a setup card plus basic/advanced settings, no more lost edits, values typed and validated
  • Shot history redo, logs/update/testing fixes, fake carry removed
  • DaisyUI/Tailwind vendored, eslint passes and runs in CI

Testing Performed

Test Environment

  • Pi Model: Pi 5 16gb
  • Camera Type: Innomaker
  • OS Version: Trixie 64-bit
  • Installation Method: Source

Test Results

  • pitrac test hardware passes
  • pitrac test camera passes (if camera-related)
  • pitrac test pulse passes (if strobe-related)
  • Simulator integration tested with:
  • Performance metrics:

Web server suite and eslint are green locally and in CI (3.10, 3.11, 3.12).

Test Commands Run

cd Software/web-server
python -m pytest -q -n auto
# 746 passed
npx eslint 'static/**/*.js'
# 0 problems

Performance Impact

  • Before: n/a
  • After: n/a
  • Impact: Neutral

Breaking Changes

  • This PR includes breaking changes
    • What breaks: settings/calibration move from JSON to SQLite, old simulators.* config keys become sim instances, the LM no longer takes config CLI flags, /api/sessions now returns {sessions, has_more}
    • Migration steps: none needed, old JSON and sim settings migrate on first start

Dependencies

  • No new dependencies

  • Updated dependencies:

    • DaisyUI 5.7.47 and Tailwind browser 4.3.3 vendored (were unpinned CDN)
    • yaml-cpp dropped
    • opencv-python-headless pinned for tests

Hardware Compatibility

  • Tested with single Pi setup

Documentation

  • No documentation needed
  • Documentation updated in this PR
  • Documentation PR to follow
  • Updated relevant sections:
    • README
    • Hardware guide
    • Software guide
    • Troubleshooting guide

Screenshots/Videos

AI (Vibe-Coded) Content Description

AI used for writing tests for TDD.

Checklist

Code Quality

  • Code follows existing patterns and conventions
  • No unnecessary comments added
  • Error handling implemented appropriately

Build & Test

  • Successfully builds with ./packaging/build.sh build
  • All existing tests pass
  • New tests added for new functionality
  • Tested on actual Raspberry Pi hardware (not just CI)

Submission Requirements

  • Commits squashed if needed (git rebase -i HEAD~n)
  • CLA signed
  • PR title follows format: [PR TYPE] Brief description
  • Branch is up-to-date with main

Additional Context

Big one, sorry. Best reviewed by area: storage, sims, config, then UI.


@connorgallopo

Copy link
Copy Markdown
Collaborator Author

recheck

…s bad keys, whole numbers for integer settings and heading fixes
@connorgallopo connorgallopo changed the title SQLite + New sim framework [Feature] SQLite storage, python sims, web UI overhaul Oct 5, 2026
@connorgallopo
connorgallopo merged commit 61d1524 into main Oct 8, 2026
8 checks passed
@connorgallopo
connorgallopo deleted the shot-history branch October 8, 2026 18:51
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant