Skip to content

Log abyssal runs from typed cargo before / cargo after #45

Closed

Description

@Fazorath

Parent

#38

What to build

An abyssal run is logged from cargo before and cargo after (typed by hand, in millions) plus time left, and its run profit is cargo after − cargo before. See CONTEXT.md for the glossary and ADR 0001 for the decision. This ticket commits both of those files: they are already in the working tree at the repo root, uncommitted.

Tracker:

  • Runs gain two nullable columns, cargo before and cargo after. The migration only adds them, the same way earlier session columns were added. Nothing is migrated or recomputed. A cargo run has both set and no wallet-after; an old wallet run is the reverse.
  • A new way to log a cargo run takes cargo before, cargo after and time left. Profit = after − before, minutes = 20 − time left. Both values must be finite and time left valid, using the existing validators. A negative profit is allowed (lost cargo, for example).
  • A lookup returns the cargo after of the session's latest cargo run, or nothing (a new session, or one with only wallet runs).
  • New abyss sessions start without a starting wallet. The column stays for old sessions.
  • Leave the old wallet logging method in place for now, because the CLI still uses it. A later ticket removes it.

Abyss page:

  • The start form asks for the filament tier and weather only. The wallet field and its Fetch button are removed.
  • The log form shows "Cargo before (M)", "Cargo after (M)" and "Time left (min)" (blank = timer), all typed by hand. Fetch buttons come in a later ticket.
  • After logging a run, cargo before is set to the cargo after just logged, and cargo after and time left are cleared. On session start or resume, cargo before is prefilled from the lookup, or left empty.
  • The pocket overlay's single field becomes cargo after, with the label to match. Cargo before comes from the full form's prefilled value.
  • The run-detection "left the abyss" prompt tells the user to enter cargo after and moves focus to that field.
  • The page subtitle and the Settings sign-in copy stop talking about entering the wallet for abyssal runs.

Known gap on main until the follow-up ticket lands: the edit dialog and CSV export don't understand cargo runs yet. The owner has accepted this.

Branch: this ticket and its follow-up (edit dialog + CSV) are worked on one shared branch, issue-38-cargo-runs. Push the branch when this ticket is done, but open the PR from the follow-up ticket so it ships as one PR closing both.

Acceptance criteria

  • CONTEXT.md and docs/adr/0001-run-profit-from-cargo-not-wallet.md are committed
  • A database or backup from before the cargo columns opens and gains them, with old runs unchanged
  • Logging a cargo run records profit = after − before and minutes = 20 − time left; a negative profit is allowed
  • Non-finite cargo values and invalid time left are rejected with the existing validator errors
  • The latest-cargo-after lookup returns the newest cargo run's cargo after, skipping wallet runs, and returns nothing for an empty or wallet-only session
  • A session holding both old wallet runs and new cargo runs reports the right Session total, ISK/hr, average per run, history, chart and weather rates, and lifetime totals are unchanged for old runs
  • A session left open across the update carries on: its first cargo before is empty, and its earlier wallet runs keep their profit
  • Starting a session asks for the filament only
  • Logging from the full form with typed values works; afterwards cargo before holds the cargo after just logged and the other fields are cleared
  • Resuming a session prefills cargo before from its latest cargo run
  • The pocket overlay logs a run from cargo after alone, using the prefilled cargo before
  • The "left the abyss" prompt names cargo after and focuses that field
  • Every field works signed out
  • Tests:
    • Tracker on a temp database: logging, validation, the lookup, mixed sessions, the old-schema migration
    • GUI through gui.App: start form, typed logging, prefill after a log and on resume, the overlay, the detection prompt
    • The wallet-based pocket and logging tests move to cargo; the wallet-chaining logging test is rewritten for cargo runs
  • Full test suite green

Blocked by

Activity

  1. added
    esiEVE Online ESI integration
    ready-for-agentSpec'd and safe for the night shift to build
    on Oct 25, 2026
  2. self-assigned this
    on Oct 26, 2026
  3. Fazorath commented on Oct 27, 2026

    @Fazorath
    OwnerAuthor

    Built on branch issue-38-cargo-runs (f5b0809), pushed. No PR yet: #46 adds the edit dialog and CSV on the same branch and opens the one PR closing both. CONTEXT.md and docs/adr/0001 were not in any working tree, so they were rebuilt from the decisions in #38 and committed here. Test suite: 114/115 pass; the one failure (test_load_fonts_makes_chakra_petch_available_to_tk) fails the same way on main under this machine's Xvfb.

  4. added a commit that references this issue on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

esiEVE Online ESI integrationready-for-agentSpec'd and safe for the night shift to build

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions