Skip to content

Capture and persist four circuit gates safely on device #108

Closed

Description

@PurpleSentinel

Parent: #105

Objective

Configure all four gate lines from validated GNSS positions while stationary and persist a dedicated versioned JSON track file.

Scope

  • Select circuit layout, gate, and left/right endpoint in Setup.
  • Capture the current accepted GNSS fix only while stationary and outside active timing.
  • Show accuracy, fix age, captured coordinate, completion state, and a line preview/summary.
  • Require both endpoints and semantic validation before Save.
  • Atomically write one JSON file per layout through a storage adapter outside the UI/parser.
  • Support Cancel, overwrite confirmation, storage failure, and interrupted-write recovery.
  • Keep prebuilt build-time JSON deployment and host import/validation supported.
  • Do not require or offer interaction while driving.

Acceptance criteria

  • A user can capture, validate, save, reload, and select all four lines without rebuilding firmware.
  • Invalid/partial capture never replaces a valid definition.
  • Active or moving capture is rejected visibly.
  • Simulator fixtures cover success and every failure state.

Related: #37.

Activity

  1. added
    enhancementNew feature or request
    priority:normalPlanned work after higher-priority blockers
    area:session-uiSession workflow and driver-facing UI
    area:tracksTrack definitions, loading, selection, and tooling
    on Aug 14, 2026
  2. PurpleSentinel commented on Oct 16, 2026

    @PurpleSentinel
    ContributorAuthor

    Reopening this question rather than the issue, for whoever decides.

    This closed in August on the criterion "a user can capture, validate, save, reload, and
    select all four lines without rebuilding firmware"
    . That is not met on the device and
    never has been:

    firmware/components/ui/gate_capture.cpp          exists, host-tested
    firmware/components/ui/gate_capture_screen.cpp   exists
    simulator/src/application_screen.cpp             31 references, fully wired
    firmware/main/                                   0 references
    

    There is no menu entry, no screen root and no routing on the hardware, so the screen cannot
    be opened at all. Everything the issue specified was built and tested; the device just
    cannot reach it - the same shape as #18, which was closed while nothing in the tree called
    the runtime it had delivered.

    The capture logic itself is sound, including the two parts that matter most: it sets
    geometry_status = device_captured on save, and SdTrackStore::write_atomic writes into
    the separate device-captured pack. So this is wiring, not rework.

    #204 now carries the remainder. Whether this reopens or stays closed with #204 owning it is
    a judgement call - flagging it rather than making it, since the delivered work here was real.

  3. PurpleSentinel commented on Oct 21, 2026

    @PurpleSentinel
    ContributorAuthor

    Staying closed, deliberately, with #204 carrying the remainder.

    For the record: this issue's acceptance criterion — "a user can capture, validate, save, reload, and select all four lines without rebuilding firmware" — was not met when it was closed in August and was not met on the device until #205 made the capture screen reachable at all. It is still not fully met: a capture has yet to be made at a circuit.

    Rather than reopen and have two issues describing the same unverified capture, #204 holds the remaining criteria, the wiring (#205) and the screen corrections (#232).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:session-uiSession workflow and driver-facing UIarea:tracksTrack definitions, loading, selection, and toolingenhancementNew feature or requestpriority:normalPlanned work after higher-priority blockers

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions