fix(dashboard): F-U-008 + F-U-014 back-link to app slug, public_base_url for webhook

F-U-008: scripts/[id]'s "← Scripts" back-link used `base + '/'` which
the root page redirects to /apps. The breadcrumb already resolves
appSlug; switch the back-link to `{base}/apps/{appSlug}` (falling back
to `{base}/apps` when appSlug isn't loaded yet).

F-U-014: emailInboundUrl built the webhook URL from
window.location.origin — wrong when the admin browses via an internal
LAN address but the public webhook URL is on a different host.
VersionInfo.public_base_url already exists for exactly this case; the
apps/[slug] page now loads /version alongside the app fetch and
prefers public_base_url for the webhook URL display. Falls back to
window.location.origin if /version hasn't loaded.

AUDIT.md anchors: F-U-008, F-U-014.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
MechaCat02
2026-06-07 20:58:35 +02:00
parent 6b5da50a38
commit 86698afc24
2 changed files with 19 additions and 2 deletions

View File

@@ -417,7 +417,9 @@
</script>
<section>
<a class="back" href={base + '/'}> Scripts</a>
<a class="back" href={appSlug ? `${base}/apps/${appSlug}` : `${base}/apps`}>
{appSlug ?? 'Apps'}
</a>
{#if scriptLoading}
<p class="muted">Loading…</p>