Grandfather the agent's sidebar section, and stop navigation reopening sections Her surfaces are grandfathered rather than launched: an account that has already written to her keeps Chat, Computers and Memory, an operator always has them, and a new account does not see the section at all. "Has any message" is the wrong question. Every conversation is created with a greeting already in it, so that is true the instant chat is opened and would grandfather everyone. `user_has_messages?/1` asks for a message the *person* wrote. There is a test that fails on the naive version specifically. The answer is resolved once, by the mount that builds the scope, and carried as a virtual field. The sidebar asks on every render -- per token on chat -- so it must stay a field read and never become a query. Writing the first message grants it in place, so the section appears without a reload. Also fixes a separate bug the section exposed: navigating between pages reopened sections the reader had collapsed. The hook forced open any section whose server-rendered `open` was true, which cannot distinguish "contains the page you are on" from "open by default". It now asks the DOM, where the active row already marks itself `aria-current`, so the reader's choice survives navigation and a page still can never be hidden inside a closed section. Alongside: halve the hero glow. Strength is now two multiplied dials, because the light theme's rule outranks a placement's and a plain `opacity` override would have silently done nothing in light mode.
Grandfather the agent's sidebar section, and stop navigation reopening sections
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
assets/css/app.css -
modified
assets/css/openagents.css -
modified
lib/openagents/accounts/user.ex -
modified
lib/openagents/conversations.ex -
modified
lib/openagents_web/components/layouts.ex -
modified
lib/openagents_web/live/chat_live.ex -
modified
lib/openagents_web/live/project_index_live.ex -
modified
lib/openagents_web/user_auth.ex -
modified
test/openagents/conversations_test.exs -
added
test/openagents_web/live/agent_surfaces_test.exs -
modified
test/openagents_web/live/changelog_live_test.exs -
modified
test/openagents_web/live/chat_live_test.exs -
modified
test/openagents_web/live/computers_navigation_test.exs -
modified
test/openagents_web/live/leaderboard_live_test.exs -
modified
test/support/conn_case.ex
Diff
15 files changed, +253 -26
assets/css/app.css modified +11
@@ -401,6 +401,17 @@
| 401 | 401 |
|
| 402 | 402 |
|
| 403 | 403 |
|
| 404 |
|
|
| 405 |
|
|
| 406 |
|
|
| 407 |
|
|
| 408 |
|
|
| 409 |
|
|
| 410 |
|
|
| 411 |
|
|
| 412 |
|
|
| 413 |
|
|
| 414 |
|
|
| 404 | 415 |
|
| 405 | 416 |
|
| 406 | 417 |
|
assets/css/openagents.css modified +19 -5
@@ -3344,6 +3344,12 @@
| 3344 | 3344 |
|
| 3345 | 3345 |
|
| 3346 | 3346 |
|
| 3347 |
|
|
| 3348 |
|
|
| 3349 |
|
|
| 3350 |
|
|
| 3351 |
|
|
| 3352 |
|
|
| 3347 | 3353 |
|
| 3348 | 3354 |
|
| 3349 | 3355 |
|
@@ -3391,7 +3397,7 @@
| 3391 | 3397 |
|
| 3392 | 3398 |
|
| 3393 | 3399 |
|
| 3394 |
|
|
| 3400 |
|
|
| 3395 | 3401 |
|
| 3396 | 3402 |
|
| 3397 | 3403 |
|
@@ -4883,6 +4889,9 @@
| 4883 | 4889 |
|
| 4884 | 4890 |
|
| 4885 | 4891 |
|
| 4892 |
|
|
| 4893 |
|
|
| 4894 |
|
|
| 4886 | 4895 |
|
| 4887 | 4896 |
|
| 4888 | 4897 |
|
@@ -6201,19 +6210,24 @@
| 6201 | 6210 |
|
| 6202 | 6211 |
|
| 6203 | 6212 |
|
| 6204 |
|
|
| 6205 |
|
|
| 6213 |
|
|
| 6214 |
|
|
| 6215 |
|
|
| 6216 |
|
|
| 6217 |
|
|
| 6218 |
|
|
| 6219 |
|
|
| 6206 | 6220 |
|
| 6207 | 6221 |
|
| 6208 | 6222 |
|
| 6209 | 6223 |
|
| 6210 | 6224 |
|
| 6211 |
|
|
| 6225 |
|
|
| 6212 | 6226 |
|
| 6213 | 6227 |
|
| 6214 | 6228 |
|
| 6215 | 6229 |
|
| 6216 |
|
|
| 6230 |
|
|
| 6217 | 6231 |
|
| 6218 | 6232 |
|
| 6219 | 6233 |
|
lib/openagents/accounts/user.ex modified +7
@@ -25,6 +25,12 @@ defmodule OpenAgents.Accounts.User do
| 25 | 25 |
|
| 26 | 26 |
|
| 27 | 27 |
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
|
| 31 |
|
|
| 32 |
|
|
| 33 |
|
|
| 28 | 34 |
|
| 29 | 35 |
|
| 30 | 36 |
|
lib/openagents/conversations.ex modified +26
@@ -48,6 +48,32 @@ defmodule OpenAgents.Conversations do
| 48 | 48 |
|
| 49 | 49 |
|
| 50 | 50 |
|
| 51 |
|
|
| 52 |
|
|
| 53 |
|
|
| 54 |
|
|
| 55 |
|
|
| 56 |
|
|
| 57 |
|
|
| 58 |
|
|
| 59 |
|
|
| 60 |
|
|
| 61 |
|
|
| 62 |
|
|
| 63 |
|
|
| 64 |
|
|
| 65 |
|
|
| 66 |
|
|
| 67 |
|
|
| 68 |
|
|
| 69 |
|
|
| 70 |
|
|
| 71 |
|
|
| 72 |
|
|
| 73 |
|
|
| 74 |
|
|
| 75 |
|
|
| 76 |
|
|
| 51 | 77 |
|
| 52 | 78 |
|
| 53 | 79 |
|
lib/openagents_web/components/layouts.ex modified +27 -11
@@ -252,7 +252,8 @@ defmodule OpenAgentsWeb.Layouts do
| 252 | 252 |
|
| 253 | 253 |
|
| 254 | 254 |
|
| 255 |
|
|
| 255 |
|
|
| 256 |
|
|
| 256 | 257 |
|
| 257 | 258 |
|
| 258 | 259 |
|
@@ -269,7 +270,6 @@ defmodule OpenAgentsWeb.Layouts do
| 269 | 270 |
|
| 270 | 271 |
|
| 271 | 272 |
|
| 272 |
|
|
| 273 | 273 |
|
| 274 | 274 |
|
| 275 | 275 |
|
@@ -279,13 +279,14 @@ defmodule OpenAgentsWeb.Layouts do
| 279 | 279 |
|
| 280 | 280 |
|
| 281 | 281 |
|
| 282 |
|
|
| 283 |
|
|
| 284 |
|
|
| 285 |
|
|
| 286 |
|
|
| 287 |
|
|
| 288 |
|
|
| 282 |
|
|
| 283 |
|
|
| 284 |
|
|
| 285 |
|
|
| 286 |
|
|
| 287 |
|
|
| 288 |
|
|
| 289 |
|
|
| 289 | 290 |
|
| 290 | 291 |
|
| 291 | 292 |
|
@@ -337,7 +338,12 @@ defmodule OpenAgentsWeb.Layouts do
| 337 | 338 |
|
| 338 | 339 |
|
| 339 | 340 |
|
| 340 |
|
|
| 341 |
|
|
| 342 |
|
|
| 343 |
|
|
| 344 |
|
|
| 345 |
|
|
| 346 |
|
|
| 341 | 347 |
|
| 342 | 348 |
|
| 343 | 349 |
|
@@ -540,6 +546,8 @@ defmodule OpenAgentsWeb.Layouts do
| 540 | 546 |
|
| 541 | 547 |
|
| 542 | 548 |
|
| 549 |
|
|
| 550 |
|
|
| 543 | 551 |
|
| 544 | 552 |
|
| 545 | 553 |
|
@@ -565,7 +573,7 @@ defmodule OpenAgentsWeb.Layouts do
| 565 | 573 |
|
| 566 | 574 |
|
| 567 | 575 |
|
| 568 |
|
|
| 576 |
|
|
| 569 | 577 |
|
| 570 | 578 |
|
| 571 | 579 |
|
@@ -590,6 +598,14 @@ defmodule OpenAgentsWeb.Layouts do
| 590 | 598 |
|
| 591 | 599 |
|
| 592 | 600 |
|
| 601 |
|
|
| 602 |
|
|
| 603 |
|
|
| 604 |
|
|
| 605 |
|
|
| 606 |
|
|
| 607 |
|
|
| 608 |
|
|
| 593 | 609 |
|
| 594 | 610 |
|
| 595 | 611 |
|
lib/openagents_web/live/chat_live.ex modified +12
@@ -382,6 +382,7 @@ defmodule OpenAgentsWeb.ChatLive do
| 382 | 382 |
|
| 383 | 383 |
|
| 384 | 384 |
|
| 385 |
|
|
| 385 | 386 |
|
| 386 | 387 |
|
| 387 | 388 |
|
@@ -392,6 +393,17 @@ defmodule OpenAgentsWeb.ChatLive do
| 392 | 393 |
|
| 393 | 394 |
|
| 394 | 395 |
|
| 396 |
|
|
| 397 |
|
|
| 398 |
|
|
| 399 |
|
|
| 400 |
|
|
| 401 |
|
|
| 402 |
|
|
| 403 |
|
|
| 404 |
|
|
| 405 |
|
|
| 406 |
|
|
| 395 | 407 |
|
| 396 | 408 |
|
| 397 | 409 |
|
lib/openagents_web/live/project_index_live.ex modified +3 -3
@@ -70,8 +70,8 @@ defmodule OpenAgentsWeb.ProjectIndexLive do
| 70 | 70 |
|
| 71 | 71 |
|
| 72 | 72 |
|
| 73 |
|
|
| 74 |
|
|
| 73 |
|
|
| 74 |
|
|
| 75 | 75 |
|
| 76 | 76 |
|
| 77 | 77 |
|
@@ -82,7 +82,7 @@ defmodule OpenAgentsWeb.ProjectIndexLive do
| 82 | 82 |
|
| 83 | 83 |
|
| 84 | 84 |
|
| 85 |
|
|
| 85 |
|
|
| 86 | 86 |
|
| 87 | 87 |
|
| 88 | 88 |
|
lib/openagents_web/user_auth.ex modified +8 -2
@@ -47,13 +47,19 @@ defmodule OpenAgentsWeb.UserAuth do
| 47 | 47 |
|
| 48 | 48 |
|
| 49 | 49 |
|
| 50 |
|
|
| 51 |
|
|
| 52 |
|
|
| 53 |
|
|
| 54 |
|
|
| 55 |
|
|
| 50 | 56 |
|
| 51 | 57 |
|
| 52 | 58 |
|
| 53 | 59 |
|
| 54 | 60 |
|
| 55 | 61 |
|
| 56 |
|
|
| 62 |
|
|
| 57 | 63 |
|
| 58 | 64 |
|
| 59 | 65 |
|
@@ -69,7 +75,7 @@ defmodule OpenAgentsWeb.UserAuth do
| 69 | 75 |
|
| 70 | 76 |
|
| 71 | 77 |
|
| 72 |
|
|
| 78 |
|
|
| 73 | 79 |
|
| 74 | 80 |
|
| 75 | 81 |
|
test/openagents/conversations_test.exs modified +46
@@ -146,4 +146,50 @@ defmodule OpenAgents.ConversationsTest do
| 146 | 146 |
|
| 147 | 147 |
|
| 148 | 148 |
|
| 149 |
|
|
| 150 |
|
|
| 151 |
|
|
| 152 |
|
|
| 153 |
|
|
| 154 |
|
|
| 155 |
|
|
| 156 |
|
|
| 157 |
|
|
| 158 |
|
|
| 159 |
|
|
| 160 |
|
|
| 161 |
|
|
| 162 |
|
|
| 163 |
|
|
| 164 |
|
|
| 165 |
|
|
| 166 |
|
|
| 167 |
|
|
| 168 |
|
|
| 169 |
|
|
| 170 |
|
|
| 171 |
|
|
| 172 |
|
|
| 173 |
|
|
| 174 |
|
|
| 175 |
|
|
| 176 |
|
|
| 177 |
|
|
| 178 |
|
|
| 179 |
|
|
| 180 |
|
|
| 181 |
|
|
| 182 |
|
|
| 183 |
|
|
| 184 |
|
|
| 185 |
|
|
| 186 |
|
|
| 187 |
|
|
| 188 |
|
|
| 189 |
|
|
| 190 |
|
|
| 191 |
|
|
| 192 |
|
|
| 193 |
|
|
| 194 |
|
|
| 149 | 195 |
|
test/openagents_web/live/agent_surfaces_test.exs added +73
@@ -0,0 +1,73 @@
| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
|
| 21 |
|
|
| 22 |
|
|
| 23 |
|
|
| 24 |
|
|
| 25 |
|
|
| 26 |
|
|
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
|
| 31 |
|
|
| 32 |
|
|
| 33 |
|
|
| 34 |
|
|
| 35 |
|
|
| 36 |
|
|
| 37 |
|
|
| 38 |
|
|
| 39 |
|
|
| 40 |
|
|
| 41 |
|
|
| 42 |
|
|
| 43 |
|
|
| 44 |
|
|
| 45 |
|
|
| 46 |
|
|
| 47 |
|
|
| 48 |
|
|
| 49 |
|
|
| 50 |
|
|
| 51 |
|
|
| 52 |
|
|
| 53 |
|
|
| 54 |
|
|
| 55 |
|
|
| 56 |
|
|
| 57 |
|
|
| 58 |
|
|
| 59 |
|
|
| 60 |
|
|
| 61 |
|
|
| 62 |
|
|
| 63 |
|
|
| 64 |
|
|
| 65 |
|
|
| 66 |
|
|
| 67 |
|
|
| 68 |
|
|
| 69 |
|
|
| 70 |
|
|
| 71 |
|
|
| 72 |
|
|
| 73 |
|
test/openagents_web/live/changelog_live_test.exs modified +1 -1
@@ -56,7 +56,7 @@ defmodule OpenAgentsWeb.ChangelogLiveTest do
| 56 | 56 |
|
| 57 | 57 |
|
| 58 | 58 |
|
| 59 |
|
|
| 59 |
|
|
| 60 | 60 |
|
| 61 | 61 |
|
| 62 | 62 |
|
test/openagents_web/live/chat_live_test.exs modified +3 -2
@@ -52,8 +52,9 @@ defmodule OpenAgentsWeb.ChatLiveTest do
| 52 | 52 |
|
| 53 | 53 |
|
| 54 | 54 |
|
| 55 |
|
|
| 56 |
|
|
| 55 |
|
|
| 56 |
|
|
| 57 |
|
|
| 57 | 58 |
|
| 58 | 59 |
|
| 59 | 60 |
|
test/openagents_web/live/leaderboard_live_test.exs modified +1 -1
@@ -48,7 +48,7 @@ defmodule OpenAgentsWeb.LeaderboardLiveTest do
| 48 | 48 |
|
| 49 | 49 |
|
| 50 | 50 |
|
| 51 |
|
|
| 51 |
|
|
| 52 | 52 |
|
| 53 | 53 |
|
| 54 | 54 |
|
test/support/conn_case.ex modified +15
@@ -64,6 +64,21 @@ defmodule OpenAgentsWeb.ConnCase do
| 64 | 64 |
|
| 65 | 65 |
|
| 66 | 66 |
|
| 67 |
|
|
| 68 |
|
|
| 69 |
|
|
| 70 |
|
|
| 71 |
|
|
| 72 |
|
|
| 73 |
|
|
| 74 |
|
|
| 75 |
|
|
| 76 |
|
|
| 77 |
|
|
| 78 |
|
|
| 79 |
|
|
| 80 |
|
|
| 81 |
|
|
| 67 | 82 |
|
| 68 | 83 |
|
| 69 | 84 |
|