Authenticated /app live_session with current_scope and app shell #62

Closed
opened 2026-09-26 13:58:56 +00:00 by belvedere · 1 comment
Collaborator

Objective: The protected shell every study screen lives inside.

Files:

  • Modify: lib/first_thousand_words_web/router.ex (new live_session)
  • Modify: lib/first_thousand_words_web/components/layouts.ex (app nav, user menu)
  • Create: lib/first_thousand_words_web/live/dashboard_live.ex (placeholder landing)

Steps:

  1. Add live_session :authenticated, on_mount: [...AshAuthentication.Phoenix.LiveSession] and
    put /app/... routes inside it.
  2. Ensure every authenticated LiveView renders <Layouts.app flash={@flash} current_scope={@current_scope}>
    as the first template element, per AGENTS.md.
  3. Build the nav: Dashboard, Practice, Decks, Languages, account menu.

Verify: signed out, /app redirects to sign-in; signed in, the shell renders with the
user's email in the menu.

Pitfalls (from AGENTS.md): never call <.flash_group> outside layouts.ex; never access a
changeset directly in a template — drive forms from a to_form/2 assign.

**Objective:** The protected shell every study screen lives inside. **Files:** - Modify: `lib/first_thousand_words_web/router.ex` (new `live_session`) - Modify: `lib/first_thousand_words_web/components/layouts.ex` (app nav, user menu) - Create: `lib/first_thousand_words_web/live/dashboard_live.ex` (placeholder landing) **Steps:** 1. Add `live_session :authenticated, on_mount: [...AshAuthentication.Phoenix.LiveSession]` and put `/app/...` routes inside it. 2. Ensure every authenticated LiveView renders `<Layouts.app flash={@flash} current_scope={@current_scope}>` as the first template element, per AGENTS.md. 3. Build the nav: Dashboard, Practice, Decks, Languages, account menu. **Verify:** signed out, `/app` redirects to sign-in; signed in, the shell renders with the user's email in the menu. **Pitfalls (from AGENTS.md):** never call `<.flash_group>` outside `layouts.ex`; never access a changeset directly in a template — drive forms from a `to_form/2` assign.
Author
Collaborator

Duplicate of #10 — created by a re-run whose pagination helper only saw the first page of issues. Closing to keep the backlog clean. Repo owner can delete this outright.

Duplicate of #10 — created by a re-run whose pagination helper only saw the first page of issues. Closing to keep the backlog clean. Repo owner can delete this outright.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nickkeers/first-thousand-words#62
No description provided.