Show Admin on every sidebar, and stop collapsed sections flashing open Two bugs with the same shape: a default that made a mistake look like a legitimate state. `sidebar_footer/1` defaulted its user to nil, so a forgotten attribute was indistinguishable from a signed-out visitor. The docs and component-library layouts had both forgotten it, and an operator browsing either surface silently had no Admin row. The attribute is required now -- nil is still fine to pass, it just has to be said, and the catalogue demo says it. The collapsed-section state had the same problem one layer out. It lived only in the browser and was applied by a hook after the document arrived. Several sidebar destinations live in different live sessions, so moving between them is a full page load: the server, knowing nothing, sent every section open, the browser painted that, and the hook shut it a frame later. The reader watched a section they had collapsed expand and collapse on every navigation. A preference that has to affect the first paint has to travel with the request. The hook writes a cookie, a plug reads it into the session, and the section renders collapsed to begin with -- there is no longer a wrong state to correct. The cookie is reader-supplied, so it is bounded on the way in: junk, wrong shapes, oversized payloads, and keys that are not section ids are dropped. The state is threaded to the shell explicitly rather than read ambiently, so a page cannot quietly lose it. All three guards were verified by injecting the defect each exists to catch. Also: the dev server reads PORT, defaulting to 4000. Moving it aside so another agent can verify against the canonical port should not mean editing checked-in config.
Show Admin on every sidebar, and stop collapsed sections flashing open
Deploy story
What this commit did to the running system — joined from the forge receipt chain, the part a commit page elsewhere cannot show.
Not deployed through the forge lane
No push, promotion, build, or deploy receipt references this commit (receipts are scanned over a bounded recent window). Changes shipped by full node replacement carry their proof in the release gate receipt instead.
Changed files
-
modified
config/dev.exs -
modified
lib/openagents_web/components/layouts.ex -
modified
lib/openagents_web/components/layouts/components.html.heex -
modified
lib/openagents_web/components/layouts/docs.html.heex -
modified
lib/openagents_web/live/admin_forge_live.ex -
modified
lib/openagents_web/live/admin_live.ex -
modified
lib/openagents_web/live/admin_recordings_live.ex -
modified
lib/openagents_web/live/admin_scv_accounts_live.ex -
modified
lib/openagents_web/live/api_tokens_live.ex -
modified
lib/openagents_web/live/assignee_index_live.ex -
modified
lib/openagents_web/live/changelog_live.ex -
modified
lib/openagents_web/live/chat_live.ex -
modified
lib/openagents_web/live/code_blob_live.ex -
modified
lib/openagents_web/live/code_commit_live.ex -
modified
lib/openagents_web/live/code_repo_live.ex -
modified
lib/openagents_web/live/components_live.ex -
modified
lib/openagents_web/live/computers_live.ex -
modified
lib/openagents_web/live/home_live.ex -
modified
lib/openagents_web/live/issue_index_live.ex -
modified
lib/openagents_web/live/issue_new_live.ex -
modified
lib/openagents_web/live/issue_show_live.ex -
modified
lib/openagents_web/live/label_index_live.ex -
modified
lib/openagents_web/live/leaderboard_live.ex -
modified
lib/openagents_web/live/memory_live.ex -
modified
lib/openagents_web/live/milestone_index_live.ex -
modified
lib/openagents_web/live/network_status_live.ex -
modified
lib/openagents_web/live/project_index_live.ex -
modified
lib/openagents_web/live/project_show_live.ex -
modified
lib/openagents_web/live/ui_gallery_live.ex -
modified
lib/openagents_web/live/voice_spike_live.ex -
added
lib/openagents_web/plugs/sidebar_sections.ex -
modified
lib/openagents_web/router.ex -
modified
lib/openagents_web/user_auth.ex -
added
test/openagents_web/sidebar_state_test.exs
Diff
34 files changed, +500 -46
config/dev.exs modified +4 -1
@@ -38,7 +38,10 @@ config :openagents, :github_token_decryption_keys, %{}
| 38 | 38 |
|
| 39 | 39 |
|
| 40 | 40 |
|
| 41 |
|
|
| 41 |
|
|
| 42 |
|
|
| 43 |
|
|
| 44 |
|
|
| 42 | 45 |
|
| 43 | 46 |
|
| 44 | 47 |
|
lib/openagents_web/components/layouts.ex modified +67 -15
@@ -22,7 +22,7 @@ defmodule OpenAgentsWeb.Layouts do
| 22 | 22 |
|
| 23 | 23 |
|
| 24 | 24 |
|
| 25 |
|
|
| 25 |
|
|
| 26 | 26 |
|
| 27 | 27 |
|
| 28 | 28 |
|
@@ -33,6 +33,15 @@ defmodule OpenAgentsWeb.Layouts do
| 33 | 33 |
|
| 34 | 34 |
|
| 35 | 35 |
|
| 36 |
|
|
| 37 |
|
|
| 38 |
|
|
| 39 |
|
|
| 40 |
|
|
| 41 |
|
|
| 42 |
|
|
| 43 |
|
|
| 44 |
|
|
| 36 | 45 |
|
| 37 | 46 |
|
| 38 | 47 |
|
@@ -67,7 +76,11 @@ defmodule OpenAgentsWeb.Layouts do
| 67 | 76 |
|
| 68 | 77 |
|
| 69 | 78 |
|
| 70 |
|
|
| 79 |
|
|
| 80 |
|
|
| 81 |
|
|
| 82 |
|
|
| 83 |
|
|
| 71 | 84 |
|
| 72 | 85 |
|
| 73 | 86 |
|
@@ -208,7 +221,14 @@ defmodule OpenAgentsWeb.Layouts do
| 208 | 221 |
|
| 209 | 222 |
|
| 210 | 223 |
|
| 211 |
|
|
| 224 |
|
|
| 225 |
|
|
| 226 |
|
|
| 227 |
|
|
| 228 |
|
|
| 229 |
|
|
| 230 |
|
|
| 231 |
|
|
| 212 | 232 |
|
| 213 | 233 |
|
| 214 | 234 |
|
@@ -252,7 +272,19 @@ defmodule OpenAgentsWeb.Layouts do
| 252 | 272 |
|
| 253 | 273 |
|
| 254 | 274 |
|
| 255 |
|
|
| 275 |
|
|
| 276 |
|
|
| 277 |
|
|
| 278 |
|
|
| 279 |
|
|
| 280 |
|
|
| 281 |
|
|
| 282 |
|
|
| 283 |
|
|
| 284 |
|
|
| 285 |
|
|
| 286 |
|
|
| 287 |
|
|
| 256 | 288 |
|
| 257 | 289 |
|
| 258 | 290 |
|
@@ -262,7 +294,11 @@ defmodule OpenAgentsWeb.Layouts do
| 262 | 294 |
|
| 263 | 295 |
|
| 264 | 296 |
|
| 265 |
|
|
| 297 |
|
|
| 298 |
|
|
| 299 |
|
|
| 300 |
|
|
| 301 |
|
|
| 266 | 302 |
|
| 267 | 303 |
|
| 268 | 304 |
|
@@ -288,23 +324,31 @@ defmodule OpenAgentsWeb.Layouts do
| 288 | 324 |
|
| 289 | 325 |
|
| 290 | 326 |
|
| 291 |
|
|
| 327 |
|
|
| 328 |
|
|
| 329 |
|
|
| 330 |
|
|
| 331 |
|
|
| 332 |
|
|
| 292 | 333 |
|
| 293 | 334 |
|
| 335 |
|
|
| 336 |
|
|
| 337 |
|
|
| 338 |
|
|
| 294 | 339 |
|
| 295 |
|
|
| 340 |
|
|
| 296 | 341 |
|
| 297 | 342 |
|
| 298 | 343 |
|
| 299 | 344 |
|
| 300 | 345 |
|
| 301 | 346 |
|
| 302 |
|
|
| 303 |
|
|
| 304 |
|
|
| 305 |
|
|
| 306 |
|
|
| 307 |
|
|
| 347 |
|
|
| 348 |
|
|
| 349 |
|
|
| 350 |
|
|
| 351 |
|
|
| 308 | 352 |
|
| 309 | 353 |
|
| 310 | 354 |
|
@@ -542,11 +586,14 @@ defmodule OpenAgentsWeb.Layouts do
| 542 | 586 |
|
| 543 | 587 |
|
| 544 | 588 |
|
| 589 |
|
|
| 545 | 590 |
|
| 546 | 591 |
|
| 547 | 592 |
|
| 548 | 593 |
|
| 549 |
|
|
| 594 |
|
|
| 595 |
|
|
| 596 |
|
|
| 550 | 597 |
|
| 551 | 598 |
|
| 552 | 599 |
|
@@ -573,7 +620,12 @@ defmodule OpenAgentsWeb.Layouts do
| 573 | 620 |
|
| 574 | 621 |
|
| 575 | 622 |
|
| 576 |
|
|
| 623 |
|
|
| 624 |
|
|
| 625 |
|
|
| 626 |
|
|
| 627 |
|
|
| 628 |
|
|
| 577 | 629 |
|
| 578 | 630 |
|
| 579 | 631 |
|
lib/openagents_web/components/layouts/components.html.heex modified +7 -2
@@ -7,6 +7,7 @@
| 7 | 7 |
|
| 8 | 8 |
|
| 9 | 9 |
|
| 10 |
|
|
| 10 | 11 |
|
| 11 | 12 |
|
| 12 | 13 |
|
@@ -19,7 +20,11 @@
| 19 | 20 |
|
| 20 | 21 |
|
| 21 | 22 |
|
| 22 |
|
|
| 23 |
|
|
| 24 |
|
|
| 25 |
|
|
| 26 |
|
|
| 27 |
|
|
| 23 | 28 |
|
| 24 | 29 |
|
| 25 | 30 |
|
lib/openagents_web/components/layouts/docs.html.heex modified +2 -1
lib/openagents_web/live/admin_forge_live.ex modified +5 -1
@@ -109,7 +109,11 @@ defmodule OpenAgentsWeb.AdminForgeLive do
| 109 | 109 |
|
| 110 | 110 |
|
| 111 | 111 |
|
| 112 |
|
|
| 112 |
|
|
| 113 |
|
|
| 114 |
|
|
| 115 |
|
|
| 116 |
|
|
| 113 | 117 |
|
| 114 | 118 |
|
| 115 | 119 |
|
lib/openagents_web/live/admin_live.ex modified +7 -1
@@ -70,7 +70,13 @@ defmodule OpenAgentsWeb.AdminLive do
| 70 | 70 |
|
| 71 | 71 |
|
| 72 | 72 |
|
| 73 |
|
|
| 73 |
|
|
| 74 |
|
|
| 75 |
|
|
| 76 |
|
|
| 77 |
|
|
| 78 |
|
|
| 79 |
|
|
| 74 | 80 |
|
| 75 | 81 |
|
| 76 | 82 |
|
lib/openagents_web/live/admin_recordings_live.ex modified +7 -1
@@ -69,7 +69,13 @@ defmodule OpenAgentsWeb.AdminRecordingsLive do
| 69 | 69 |
|
| 70 | 70 |
|
| 71 | 71 |
|
| 72 |
|
|
| 72 |
|
|
| 73 |
|
|
| 74 |
|
|
| 75 |
|
|
| 76 |
|
|
| 77 |
|
|
| 78 |
|
|
| 73 | 79 |
|
| 74 | 80 |
|
| 75 | 81 |
|
lib/openagents_web/live/admin_scv_accounts_live.ex modified +6 -1
@@ -104,7 +104,12 @@ defmodule OpenAgentsWeb.AdminScvAccountsLive do
| 104 | 104 |
|
| 105 | 105 |
|
| 106 | 106 |
|
| 107 |
|
|
| 107 |
|
|
| 108 |
|
|
| 109 |
|
|
| 110 |
|
|
| 111 |
|
|
| 112 |
|
|
| 108 | 113 |
|
| 109 | 114 |
|
| 110 | 115 |
|
lib/openagents_web/live/api_tokens_live.ex modified +5 -1
@@ -46,7 +46,11 @@ defmodule OpenAgentsWeb.ApiTokensLive do
| 46 | 46 |
|
| 47 | 47 |
|
| 48 | 48 |
|
| 49 |
|
|
| 49 |
|
|
| 50 |
|
|
| 51 |
|
|
| 52 |
|
|
| 53 |
|
|
| 50 | 54 |
|
| 51 | 55 |
|
| 52 | 56 |
|
lib/openagents_web/live/assignee_index_live.ex modified +5 -1
@@ -27,7 +27,11 @@ defmodule OpenAgentsWeb.AssigneeIndexLive do
| 27 | 27 |
|
| 28 | 28 |
|
| 29 | 29 |
|
| 30 |
|
|
| 30 |
|
|
| 31 |
|
|
| 32 |
|
|
| 33 |
|
|
| 34 |
|
|
| 31 | 35 |
|
| 32 | 36 |
|
| 33 | 37 |
|
lib/openagents_web/live/changelog_live.ex modified +6 -1
@@ -90,7 +90,12 @@ defmodule OpenAgentsWeb.ChangelogLive do
| 90 | 90 |
|
| 91 | 91 |
|
| 92 | 92 |
|
| 93 |
|
|
| 93 |
|
|
| 94 |
|
|
| 95 |
|
|
| 96 |
|
|
| 97 |
|
|
| 98 |
|
|
| 94 | 99 |
|
| 95 | 100 |
|
| 96 | 101 |
|
lib/openagents_web/live/chat_live.ex modified +7 -1
@@ -626,7 +626,13 @@ defmodule OpenAgentsWeb.ChatLive do
| 626 | 626 |
|
| 627 | 627 |
|
| 628 | 628 |
|
| 629 |
|
|
| 629 |
|
|
| 630 |
|
|
| 631 |
|
|
| 632 |
|
|
| 633 |
|
|
| 634 |
|
|
| 635 |
|
|
| 630 | 636 |
|
| 631 | 637 |
|
| 632 | 638 |
|
lib/openagents_web/live/code_blob_live.ex modified +6 -1
@@ -75,7 +75,12 @@ defmodule OpenAgentsWeb.CodeBlobLive do
| 75 | 75 |
|
| 76 | 76 |
|
| 77 | 77 |
|
| 78 |
|
|
| 78 |
|
|
| 79 |
|
|
| 80 |
|
|
| 81 |
|
|
| 82 |
|
|
| 83 |
|
|
| 79 | 84 |
|
| 80 | 85 |
|
| 81 | 86 |
|
lib/openagents_web/live/code_commit_live.ex modified +6 -1
@@ -127,7 +127,12 @@ defmodule OpenAgentsWeb.CodeCommitLive do
| 127 | 127 |
|
| 128 | 128 |
|
| 129 | 129 |
|
| 130 |
|
|
| 130 |
|
|
| 131 |
|
|
| 132 |
|
|
| 133 |
|
|
| 134 |
|
|
| 135 |
|
|
| 131 | 136 |
|
| 132 | 137 |
|
| 133 | 138 |
|
lib/openagents_web/live/code_repo_live.ex modified +6 -1
@@ -55,7 +55,12 @@ defmodule OpenAgentsWeb.CodeRepoLive do
| 55 | 55 |
|
| 56 | 56 |
|
| 57 | 57 |
|
| 58 |
|
|
| 58 |
|
|
| 59 |
|
|
| 60 |
|
|
| 61 |
|
|
| 62 |
|
|
| 63 |
|
|
| 59 | 64 |
|
| 60 | 65 |
|
| 61 | 66 |
|
lib/openagents_web/live/components_live.ex modified +1 -1
lib/openagents_web/live/computers_live.ex modified +6 -1
@@ -192,7 +192,12 @@ defmodule OpenAgentsWeb.ComputersLive do
| 192 | 192 |
|
| 193 | 193 |
|
| 194 | 194 |
|
| 195 |
|
|
| 195 |
|
|
| 196 |
|
|
| 197 |
|
|
| 198 |
|
|
| 199 |
|
|
| 200 |
|
|
| 196 | 201 |
|
| 197 | 202 |
|
| 198 | 203 |
|
lib/openagents_web/live/home_live.ex modified +13 -2
@@ -69,7 +69,13 @@ defmodule OpenAgentsWeb.HomeLive do
| 69 | 69 |
|
| 70 | 70 |
|
| 71 | 71 |
|
| 72 |
|
|
| 72 |
|
|
| 73 |
|
|
| 74 |
|
|
| 75 |
|
|
| 76 |
|
|
| 77 |
|
|
| 78 |
|
|
| 73 | 79 |
|
| 74 | 80 |
|
| 75 | 81 |
|
@@ -188,7 +194,12 @@ defmodule OpenAgentsWeb.HomeLive do
| 188 | 194 |
|
| 189 | 195 |
|
| 190 | 196 |
|
| 191 |
|
|
| 197 |
|
|
| 198 |
|
|
| 199 |
|
|
| 200 |
|
|
| 201 |
|
|
| 202 |
|
|
| 192 | 203 |
|
| 193 | 204 |
|
| 194 | 205 |
|
lib/openagents_web/live/issue_index_live.ex modified +7 -1
@@ -80,7 +80,13 @@ defmodule OpenAgentsWeb.IssueIndexLive do
| 80 | 80 |
|
| 81 | 81 |
|
| 82 | 82 |
|
| 83 |
|
|
| 83 |
|
|
| 84 |
|
|
| 85 |
|
|
| 86 |
|
|
| 87 |
|
|
| 88 |
|
|
| 89 |
|
|
| 84 | 90 |
|
| 85 | 91 |
|
| 86 | 92 |
|
lib/openagents_web/live/issue_new_live.ex modified +5 -1
@@ -76,7 +76,11 @@ defmodule OpenAgentsWeb.IssueNewLive do
| 76 | 76 |
|
| 77 | 77 |
|
| 78 | 78 |
|
| 79 |
|
|
| 79 |
|
|
| 80 |
|
|
| 81 |
|
|
| 82 |
|
|
| 83 |
|
|
| 80 | 84 |
|
| 81 | 85 |
|
| 82 | 86 |
|
lib/openagents_web/live/issue_show_live.ex modified +6 -1
@@ -162,7 +162,12 @@ defmodule OpenAgentsWeb.IssueShowLive do
| 162 | 162 |
|
| 163 | 163 |
|
| 164 | 164 |
|
| 165 |
|
|
| 165 |
|
|
| 166 |
|
|
| 167 |
|
|
| 168 |
|
|
| 169 |
|
|
| 170 |
|
|
| 166 | 171 |
|
| 167 | 172 |
|
| 168 | 173 |
|
lib/openagents_web/live/label_index_live.ex modified +5 -1
@@ -47,7 +47,11 @@ defmodule OpenAgentsWeb.LabelIndexLive do
| 47 | 47 |
|
| 48 | 48 |
|
| 49 | 49 |
|
| 50 |
|
|
| 50 |
|
|
| 51 |
|
|
| 52 |
|
|
| 53 |
|
|
| 54 |
|
|
| 51 | 55 |
|
| 52 | 56 |
|
| 53 | 57 |
|
lib/openagents_web/live/leaderboard_live.ex modified +6 -1
@@ -37,7 +37,12 @@ defmodule OpenAgentsWeb.LeaderboardLive do
| 37 | 37 |
|
| 38 | 38 |
|
| 39 | 39 |
|
| 40 |
|
|
| 40 |
|
|
| 41 |
|
|
| 42 |
|
|
| 43 |
|
|
| 44 |
|
|
| 45 |
|
|
| 41 | 46 |
|
| 42 | 47 |
|
| 43 | 48 |
|
lib/openagents_web/live/memory_live.ex modified +7 -1
@@ -47,7 +47,13 @@ defmodule OpenAgentsWeb.MemoryLive do
| 47 | 47 |
|
| 48 | 48 |
|
| 49 | 49 |
|
| 50 |
|
|
| 50 |
|
|
| 51 |
|
|
| 52 |
|
|
| 53 |
|
|
| 54 |
|
|
| 55 |
|
|
| 56 |
|
|
| 51 | 57 |
|
| 52 | 58 |
|
| 53 | 59 |
|
lib/openagents_web/live/milestone_index_live.ex modified +5 -1
@@ -85,7 +85,11 @@ defmodule OpenAgentsWeb.MilestoneIndexLive do
| 85 | 85 |
|
| 86 | 86 |
|
| 87 | 87 |
|
| 88 |
|
|
| 88 |
|
|
| 89 |
|
|
| 90 |
|
|
| 91 |
|
|
| 92 |
|
|
| 89 | 93 |
|
| 90 | 94 |
|
| 91 | 95 |
|
lib/openagents_web/live/network_status_live.ex modified +6 -1
@@ -274,7 +274,12 @@ defmodule OpenAgentsWeb.NetworkStatusLive do
| 274 | 274 |
|
| 275 | 275 |
|
| 276 | 276 |
|
| 277 |
|
|
| 277 |
|
|
| 278 |
|
|
| 279 |
|
|
| 280 |
|
|
| 281 |
|
|
| 282 |
|
|
| 278 | 283 |
|
| 279 | 284 |
|
| 280 | 285 |
|
lib/openagents_web/live/project_index_live.ex modified +7 -1
@@ -62,7 +62,13 @@ defmodule OpenAgentsWeb.ProjectIndexLive do
| 62 | 62 |
|
| 63 | 63 |
|
| 64 | 64 |
|
| 65 |
|
|
| 65 |
|
|
| 66 |
|
|
| 67 |
|
|
| 68 |
|
|
| 69 |
|
|
| 70 |
|
|
| 71 |
|
|
| 66 | 72 |
|
| 67 | 73 |
|
| 68 | 74 |
|
lib/openagents_web/live/project_show_live.ex modified +5 -1
@@ -71,7 +71,11 @@ defmodule OpenAgentsWeb.ProjectShowLive do
| 71 | 71 |
|
| 72 | 72 |
|
| 73 | 73 |
|
| 74 |
|
|
| 74 |
|
|
| 75 |
|
|
| 76 |
|
|
| 77 |
|
|
| 78 |
|
|
| 75 | 79 |
|
| 76 | 80 |
|
| 77 | 81 |
|
lib/openagents_web/live/ui_gallery_live.ex modified +5 -1
@@ -39,7 +39,11 @@ defmodule OpenAgentsWeb.UIGalleryLive do
| 39 | 39 |
|
| 40 | 40 |
|
| 41 | 41 |
|
| 42 |
|
|
| 42 |
|
|
| 43 |
|
|
| 44 |
|
|
| 45 |
|
|
| 46 |
|
|
| 43 | 47 |
|
| 44 | 48 |
|
| 45 | 49 |
|
lib/openagents_web/live/voice_spike_live.ex modified +5 -1
@@ -11,7 +11,11 @@ defmodule OpenAgentsWeb.VoiceSpikeLive do
| 11 | 11 |
|
| 12 | 12 |
|
| 13 | 13 |
|
| 14 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 15 | 19 |
|
| 16 | 20 |
|
| 17 | 21 |
|
lib/openagents_web/router.ex modified +1
lib/openagents_web/user_auth.ex modified +14
@@ -47,6 +47,16 @@ defmodule OpenAgentsWeb.UserAuth do
| 47 | 47 |
|
| 48 | 48 |
|
| 49 | 49 |
|
| 50 |
|
|
| 51 |
|
|
| 52 |
|
|
| 53 |
|
|
| 54 |
|
|
| 55 |
|
|
| 56 |
|
|
| 57 |
|
|
| 58 |
|
|
| 59 |
|
|
| 50 | 60 |
|
| 51 | 61 |
|
| 52 | 62 |
|
@@ -54,6 +64,8 @@ defmodule OpenAgentsWeb.UserAuth do
| 54 | 64 |
|
| 55 | 65 |
|
| 56 | 66 |
|
| 67 |
|
|
| 68 |
|
|
| 57 | 69 |
|
| 58 | 70 |
|
| 59 | 71 |
|
@@ -70,6 +82,8 @@ defmodule OpenAgentsWeb.UserAuth do
| 70 | 82 |
|
| 71 | 83 |
|
| 72 | 84 |
|
| 85 |
|
|
| 86 |
|
|
| 73 | 87 |
|
| 74 | 88 |
|
| 75 | 89 |
|