Web: a first-time visitor loses the order link to the walkthrough and lands on Book
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
Research direction
Start with lib/core/app_routes.dart, especially firstRunRedirect, then read DeepLinkListener and its _waiting handling for how destinations resume after first run. Trace how the web router receives /order_link and preserves its query through the walkthrough and choose-node routes. Done when a first-time web visitor who completes or skips the walkthrough reaches the original OrderLinkScreen with its full query intact; verify against the reproduction steps in the issue.
Written by the indexing model from the issue text.
Description
On the web client, an order link opened by a first-time visitor is lost: the router sends it to the walkthrough and the original destination is never kept, so skipping the walkthrough lands on Book instead of the order.
This is a follow-up to #137, which built the handler. The handler itself works — the link just never reaches it.
Steps to reproduce
- Open a browser profile that has never used the web client (or clear its site data for
mostro.network). - Visit an order link:
https://mostro.network/app/#/order_link?link=mostro%3A<order-id>%3Frelays%3D<relays>%26mostro%3D<node-pubkey> - The walkthrough appears.
- Complete or skip it.
Expected: OrderLinkScreen for the order in the link, as it does on a second visit.
Actual: Book. The link is gone, with no message; the visitor has no way to recover it short of going back to wherever they found it.
Verified against v2.0.17 in Chrome. On a profile that has already completed the first run, the same URL works end to end: it resolves the order, offers the node switch naming the instance, and reaches the take-order screen.
Why it happens
firstRunRedirect discards the incoming location — lib/core/app_routes.dart#L119-L124:
String? firstRunRedirect({required bool done, required String location}) {
if (!done) {
return _firstRunRoutes.contains(location) ? null : AppRoute.walkthrough;
}
return location == AppRoute.chooseNode ? AppRoute.home : null;
}
When the first run is not done, any location outside {/walkthrough, /choose-node} returns /walkthrough and location is dropped. Nothing stores it, and /choose-node then returns AppRoute.home.
This hazard is already known and already handled — but only for the path the OS delivers. DeepLinkListener holds such a link until the first run ends (deep_link_listener.dart#L56 and #L100-L103), and its own doc comment states the reason:
A link that arrives during the first run waits for it to end — the router would send the order link screen to the walkthrough and lose it.
On web that listener is deliberately inert, because a page cannot be the handler of a mostro: link (#L76):
static Stream<String> _osLinks() =>
kIsWeb ? const Stream.empty() : AppLinks().stringLinkStream;
So on web the link enters as a URL straight into the router, which is the one path the existing mitigation does not cover.
Why it matters
The web client is the only https entry point for an order link: the app registers the mostro: scheme (#808) but no https app link, so a link shared in a group chat or on social media can only be opened as https://mostro.network/app/#/order_link?.... Anyone following such a link for the first time is, by definition, a first-time visitor of the web client — exactly the case that fails. A first-time visitor is also the one most worth not losing.
Possible direction
Not a prescription, just the shape that seems consistent with what is already there: keep the destination across the first run and resume it when firstRunProvider turns true, which is what DeepLinkListener already does with _waiting. firstRunRedirect is the natural place to capture it, since it is the function that currently throws it away.
Worth noting that the node-switch prompt the order link screen shows makes this more than a navigation detail: the destination carries which instance published the order, so resuming it has to preserve the query, not just the path.
- Dominant language
- Dart
- Stars
- 11
- Forks
- 9
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 16
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MostroP2P/app
-
documentation priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day
-
area: ui bug priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
area: ui bug priority: high
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Bug: Button "Share logs" does nothingPossibly taken @Luquitasjeffrey claimed this 7 days ago. Open
Difficulty 2/5 Half a day Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
area: rust-core bug priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
Similar issues
-
Python example: list a model's scenes and their camerasPossibly taken @rudraparmar76 claimed this today. Opendocumentation good first issue python
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
iamahsanmehmood/openskp#796 · 1 comment ·
Maintainers usually reply within 1 day
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Plural rendering: first matching part wins, but gen-l10n lets the last one win (=1 shadows one)Openbug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
crowdin/flutter-sdk#97 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
MrSpideyNihal/lockfeed#16 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
InlitX/GymMane#529 · 1 comment ·
Maintainers usually reply within 1 day