Coach: the screens, and the four things they were supposed to say
The Coach hub, the six-screen intake, the proposal review with per-change accept/reject, and the admin card — wired into App.jsx and Admin.jsx. Nothing renders unless the instance offers the Coach, so an admin page on a box that never enabled it is the page it was before. Four gaps I named earlier and owed this PR: CoachProposal had no health disclaimer. The hub and the intake screen both carry one; the screen where changes are actually accepted did not, which is the one place it matters — that tap changes what somebody does with their body next week. It sits immediately above the accept button on both proposal kinds rather than at the top of a scrolling page, so it is on screen at the decision. The admin card never showed whether the privilege drop can be performed. It fails closed, so when it cannot, nothing runs at all, and the admin was left to learn that from a user reporting silence. It now states the verdict, and the server's own reason when the answer is no. Whose account is being spent was not stated anywhere in the UI. Both the admin card and the user's Coach screen have to name it, and that is only true if neither infers it from settings — so coach-api gained the /api/coach/account call that PR 1 built the route for and nothing had used since. The credential UI was wired to a server shape that does not exist: it read d.auth.state, which GET /api/admin/coach never sent, and posted to /auth/setup-token, /auth/key and /auth/disconnect, none of which are routes. Every credential button was dead. The card now uses the connect/disconnect routes from 3/6, and the admin payload carries an auth summary — state, type and account label, never the credential — with `unreadable` as its own state, because ./data restored without its `secret` has a specific cause and a specific fix rather than being "not connected". Left out on purpose: the ChatGPT device-login sheet. It is Codex's, it calls routes that do not exist, and Codex is 6/6 — so it comes back with the provider it belongs to rather than shipping as unreachable UI here. api 72/72, frontend 404/404, build clean, 11 locales in sync. The new strings fall back to English until 5/6 adds them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
49be4e0626
commit
ab1adcdd4f
9 files changed
+1236
No files matched your search
@@ -24,6 +24,9 @@ import History from './views/History.jsx'
|
||||
import Library from './views/Library.jsx'
|
||||
import Settings from './views/Settings.jsx'
|
||||
import Admin from './views/Admin.jsx'
|
||||
import Coach from './views/Coach.jsx'
|
||||
import CoachIntake from './views/CoachIntake.jsx'
|
||||
import CoachProposal from './views/CoachProposal.jsx'
|
||||
|
||||
bindUI(useUI) // lets the shared controls open sheets without importing the store at module scope
|
||||
|
||||
@@ -75,6 +78,12 @@ function Shell() {
|
||||
<Route path="/history" element={<History />} />
|
||||
<Route path="/library" element={<Library />} />
|
||||
<Route path="/settings" element={<Settings />} />
|
||||
{/* The Coach screens gate themselves on the instance config; the routes exist
|
||||
unconditionally so a deep link from a notification lands somewhere sane
|
||||
rather than on the catch-all. */}
|
||||
<Route path="/coach" element={<Coach />} />
|
||||
<Route path="/coach/intake" element={<CoachIntake />} />
|
||||
<Route path="/coach/proposal" element={<CoachProposal />} />
|
||||
<Route path="/admin" element={user?.admin ? <Admin /> : <Navigate to="/home" replace />} />
|
||||
<Route path="*" element={<Navigate to="/home" replace />} />
|
||||
</Routes>
|
||||
|
||||
Reference in new issue
Block a user