chain-studio/lib
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
..
data fix(security): atomic hub-auth-token writes (P1-5) 2026-05-29 17:47:29 +02:00
l10n feat(settings): multi-version uninstall picker + default_scope editor 2026-05-29 00:21:51 +02:00
pages fix(welcome): structured doc-load error + Forgejo fallback link 2026-05-30 00:54:46 +02:00
theme feat(studio): surface provider + sourceKind + versionAdvisory on CapabilityInfo 2026-05-28 10:54:48 +02:00
widgets chore(deps): bump file_picker 8→11 + transitive lifts 2026-05-29 07:15:25 +02:00
main.dart feat(studio): theme-plugin picker + translate-hook wrapper 2026-05-25 23:02:21 +02:00