chain-studio/lib/pages
flemming-it 570c38b238
Some checks failed
Security / Security check (push) Failing after 2s
fix(welcome): structured doc-load error + Forgejo fallback link
The doc-reader bottom-sheet in welcome.dart hits rootBundle
to load assets/docs/<slug>[_de].md. When the asset isn't in
the bundle (e.g. the binary on disk predates the
flutter_markdown_plus migration in 69b54629 or an in-progress
asset reorganisation), the FutureBuilder's error branch dumps
the raw PlatformException text into FaiErrorBox with no
hint at what the operator should do.

Switch the throw to a structured `_DocReaderError` that
carries:
  - the slug, locale, and both attempted asset paths
  - the underlying error message
  - a precomputed `forgejoUrl` pointing at the same doc on
    the platform repo's main branch

The error UI gains a TextButton.icon below FaiErrorBox that
opens the Forgejo copy in the OS browser via the existing
SystemActions.openInOs path — operators always have a
working out, even when the local bundle is broken.

The error toString() also surfaces "rebuild Studio" as the
top suggestion, since the most common cause for asset
mismatches is a stale binary running against a newer source
tree.

New regression test (test/load_docs_test.dart) pumps the
exact code path the sheet uses (rootBundle.loadString +
Markdown with FaiTheme.markdownStyle) against all eight asset
paths (architecture/security/audit/flows × en/de). Catches a
future bundle drift before an operator notices.

No behavioural change on the happy path. Both the rendered
markdown widget and the closed-sheet animation are unchanged.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
2026-05-30 00:54:46 +02:00
..
approvals.dart feat(studio): operator QoL — flow runnability, audit grouping, batch approvals, welcome celebration (v0.42.0) 2026-05-09 11:24:57 +02:00
audit.dart feat(studio): operator QoL — flow runnability, audit grouping, batch approvals, welcome celebration (v0.42.0) 2026-05-09 11:24:57 +02:00
doctor.dart feat(doctor): per-source-kind capability breakdown line 2026-05-28 14:41:15 +02:00
flows.dart chore(deps): bump file_picker 8→11 + transitive lifts 2026-05-29 07:15:25 +02:00
modules.dart feat(studio): Doctor + Modules localized + sparse-store federation nudge (v0.25.0) 2026-05-08 01:39:42 +02:00
store.dart feat(settings): multi-version uninstall picker + default_scope editor 2026-05-29 00:21:51 +02:00
welcome.dart fix(welcome): structured doc-load error + Forgejo fallback link 2026-05-30 00:54:46 +02:00