Repository navigation
Conversation
A new setting, off by default, adds each trip's pass-holder reservation fee (2nd class) to the Interrail exact-trip list, adds up the trains of a connection, offers a "Cheapest reservation" sort and links Interrail's fee page. The fee table in src/data/fees.ts is the one train-api publishes: a stop abroad sets the fee for its country, otherwise the axe sets the domestic one. Refs #92
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before: an Interrail holder sees which trains run, but not what each pass-holder reservation costs.
After: a new setting, Interrail reservation fees (off by default), shows each trip's reservation fee on the Interrail exact-trip list, for example "Reservation €10–€20" on a TGV INOUI or €31 to Turin. A connection adds up its trains. A Cheapest reservation sort appears, along with a note that the fees are indicative, 2nd class, with a link to Interrail's fee page. With the setting off, or on a MAX pass, nothing changes.
Stacked on #83 (base
interrail-pass). It retargets tomainonce #83 merges.Screenshots
At 390 px, with the bundled snapshot.
[](https://raw.githubusercontent.com/offware-apps/MAX-Finder/4afa855f09b1efd3f6def919f80ddd2b8f019940/docs/pr-fees/fees-mobile-fr.png)[](https://raw.githubusercontent.com/offware-apps/MAX-Finder/4afa855f09b1efd3f6def919f80ddd2b8f019940/docs/pr-fees/fees-mobile-en.png)Try it
Open http://localhost:5173/?card=interrail&mode=od&from=PARIS%20(intramuros)&to=TOULOUSE%20MATABIAU, then turn on Settings → Interrail reservation fees.
How
src/data/fees.tsuses the same table that train-api publishes asv1/sncf/interrail/fees.json(Publish the Interrail reservation fees for SNCF trains train-api#11). It was hand-entered from Interrail's fee pages on 2026-10-12. If a stop is abroad, that country's fee applies (Germany €19, Lyria €25, Italy €31, Brussels €20–35, Spain €25 or €35). Otherwise the axe sets the domestic fee (TGV INOUI and Intercités €10–20, Intercités de Nuit €10–25). SNCF coaches have no published fee, so they show none and sort last.feesinmj.settingsdefaults to off and sits in the Settings dialog.ctx.feeis set only when it is on and the pass is Interrail.cheapestis a new sort key (it survives in the URL), offered only while fees show.docs/user-flows.mdis updated.Checks
tsc,npm test(235 passed, includingtests/fees.test.ts),npm run build,npm run verifyandnpm run test:e2e(23/23) all pass. The chip and note wrap without cutting text at 390 px.Refs #92