Skip to content

feat: add host_app_path option to link back to the host app - #440

Merged
zachdaniel merged 2 commits into
ash-project:mainfrom
rum-and-code:feat/host-app-link
Nov 3, 2026
Merged

zachdaniel merged 2 commits into
ash-project:mainfrom
rum-and-code:feat/host-app-link

Conversation

@etiennelacoursiere

Copy link
Copy Markdown
Contributor

Summary

When AshAdmin is mounted inside an existing Phoenix app, there is no way to get back to the host app from the admin UI. This PR adds two optional options to the ash_admin router macro:

  • :host_app_path: when set, the sidebar shows a link (under the title) back to this path.
  • :host_app_label: the link label. Defaults to "Back to app".
ash_admin "/admin",
  host_app_path: "/dashboard",
  host_app_label: "Back to dashboard"

When :host_app_path is not set, nothing changes.

image

Notes

  • The first commit (chore: rebuild assets for cinder 0.18) only regenerates app.css, which was stale since the cinder 0.17 → 0.18 bump from dependabot. The feat: commit then only adds the hero-arrow-left-mini icon to the CSS.
  • Tests added in test/page_live_test.exs (link present with custom label, default label, absent when not configured).

etiennelacoursiere and others added 2 commits November 2, 2026 12:54
app.css was not regenerated after the cinder 0.17 -> 0.18 bump. Tailwind
scans deps/cinder, so the new cinder-partial filter classes were missing
and some unused classes were still present.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds `:host_app_path` and `:host_app_label` options to the `ash_admin`
router macro. When `:host_app_path` is set, the sidebar shows a link
back to the host application. `:host_app_label` defaults to "Back to app".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zachdaniel
zachdaniel merged commit 43de567 into ash-project:main Nov 3, 2026
@zachdaniel

Copy link
Copy Markdown
Contributor

🚀 Thank you for your contribution! 🚀

@etiennelacoursiere
etiennelacoursiere deleted the feat/host-app-link branch November 3, 2026 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants