Repository navigation
fix(dashboard): make the LiveView dashboard start and render - #3
Merged
Merged
Conversation
The dashboard returned 500 on every page and could not actually start: ELIXIR_CLAW_START_DASHBOARD was documented but never read, and the endpoint had no port, secret key base, PubSub, session plug, error views or LiveView client script. The layout also read @inner_block instead of @inner_content. Add ElixirClaw.Dashboard (runtime config, localhost by default), compile-time endpoint config, error views, a root layout that serves the LiveView JS from the deps, and tests (lazy_html as a test dependency).
fix(dashboard): make the LiveView dashboard start and render
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #1 and #2. #2 was stacked on
chore/repo-hygieneand was merged into that branch after #1 had already landed onmain, so the dashboard fix never reachedmain. This PR carries that single commit (de4fdcf) over; the diff againstmainis exactly the content reviewed in #2.What it fixes
Every dashboard page returned 500 and the dashboard could not start:
ELIXIR_CLAW_START_DASHBOARDwas never read, the endpoint lacked port,secret_key_base, PubSub, session plug, error views and the LiveView client script, and the layout read@inner_blockinstead of@inner_content.Adds
ElixirClaw.Dashboard(runtime config, binds to127.0.0.1by default since there is no authentication), error views, a root layout serving the LiveView JS from the deps, README docs for the variables, and tests (lazy_htmlas a test-only dependency).Verification
:hardwareexcluded) on macOS and in anelixir:1.19Linux container; format and--warnings-as-errorsclean/api/*and JS assets return 200 withELIXIR_CLAW_START_DASHBOARD=true; LiveView connects in the browserSee #2 for the known limitations (demo data from
DashboardStub, run withmix runrather than the escript, unique-key registry).