Skip to content

Menu: pick the run first and derive its route from it - #122

Merged
vanlueckn merged 1 commit into
mainfrom
t3code/fix-scenario-route-filtering
Sep 2, 2026
Merged

Menu: pick the run first and derive its route from it#122
vanlueckn merged 1 commit into
mainfrom
t3code/fix-scenario-route-filtering

Conversation

@vanlueckn

Copy link
Copy Markdown
Collaborator

Summary

  • Restructures the main-menu drive flow: the run (scenario, operating-day service, or free run) is now the first step, and the route is derived from it instead of being asked for beforehand. A scenario names its line, a service names the line of its plan.
  • Only steps the run leaves open are walked: the line page where the run names none (the free run), the vehicle page where it brings no consists and no vehicle:, and date/weather setup for a service. A prepared scenario that brings its own route and train is one question; the free run is three.
  • Adds an Open/flow model in crates/app/src/menu.rs (run_of, Open::flow, next_step, advance) and reworks Page::back so Esc follows the run's actual step chain instead of a fixed page chain.
  • The step rail is now dynamic: it shows as many steps as the run under the cursor leaves open, so it never promises a step that will not be walked. Answers are stored per page slot and cleared behind a newly answered step.
  • world::build lets the run's own line beat the menu's route, with only --line above it. Runs whose route no installed mod provides are not offered at all.
  • Renames the old Page::Scenario/Page::Run pages to Page::Run/Page::Setup; --menu scenario still resolves to the run picker for compatibility, and --menu setup replaces --menu run for the service setup page.
  • Updates i18n keys in both en and de locales, and refreshes README.md, STATUS.md and the screenshot skill docs to describe the new flow and page names.

Testing

  • Run cargo test --workspace (baseline: 1136 tests green) — includes the i18n parity test over the en/de locale files.
  • Run cargo clippy --workspace -- -D warnings and cargo fmt --check.
  • Manual: open the menu and confirm Drive starts on the run picker; a prepared scenario goes straight to driving, the free run still walks route → vehicle.
  • Manual: pick an operating-day service and confirm the date/weather setup page follows, then the run starts two minutes before departure under the service's route.
  • Manual: verify Esc walks back through the run's actual steps and leaves at the title screen from the first step.
  • Manual: toggle a mod off in the mod manager and confirm runs on its routes disappear from the run list.
  • Manual: check --menu run, --menu scenario, --menu setup and --menu line still render the intended pages.
  • Screenshot review of the new step rail on the run picker, route and setup pages.

- A scenario names its line, a service the line of its plan, so both
  are offered under that route and never on another; runs whose route
  no installed mod brought are not offered at all
- Only the steps a run leaves open are walked: a prepared scenario is
  one question, the free run remains route -> vehicle
- `Page::Scenario` is now the first step (`Run`), date/weather move to
  a `Setup` page; `--menu scenario` stays as an alias
- `--line` still overrides the run's own route
- Update README, STATUS and screenshot skill to the new flow
@vanlueckn
vanlueckn merged commit 0e089c0 into main Sep 2, 2026
3 checks passed
@vanlueckn
vanlueckn deleted the t3code/fix-scenario-route-filtering branch September 2, 2026 15:06
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