personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

apps/chat: hide SSR talent markdown until bootstrap renders it

Server-rendered talent summary and reason cells briefly showed raw markdown characters before the bootstrap pass ran renderMarkdown over them. Hide markdown-marked nodes until bootstrap removes the marker, eliminating the flash. Live-appended cards already render through renderMarkdown directly and are unaffected.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

+46
+42
apps/chat/tests/test_routes.py
··· 172 172 assert "chat had trouble" in html 173 173 174 174 175 + def test_chat_day_marks_talent_summary_for_markdown_bootstrap( 176 + journal_copy, monkeypatch 177 + ): 178 + day = "20990102" 179 + _set_today(monkeypatch, "20990103") 180 + env = _make_env(journal_copy, monkeypatch) 181 + append_chat_event( 182 + "talent_finished", 183 + ts=_ms(2099, 1, 2, 9, 3), 184 + use_id="use-md-1", 185 + name="search", 186 + summary="**done**", 187 + ) 188 + append_chat_event( 189 + "talent_errored", 190 + ts=_ms(2099, 1, 2, 9, 4), 191 + use_id="use-md-2", 192 + name="exec", 193 + reason="**bad args**", 194 + ) 195 + 196 + response = env.client.get(f"/app/chat/{day}") 197 + html = response.get_data(as_text=True) 198 + 199 + assert response.status_code == 200 200 + assert ( 201 + html.count( 202 + '<div class="chat-talent-card-detail ' 203 + 'chat-talent-card-detail--markdown" data-markdown="1">' 204 + ) 205 + == 2 206 + ) 207 + assert ( 208 + '<div class="chat-talent-card-detail ' 209 + 'chat-talent-card-detail--markdown" data-markdown="1">**done**</div>' 210 + ) in html 211 + assert ( 212 + '<div class="chat-talent-card-detail ' 213 + 'chat-talent-card-detail--markdown" data-markdown="1">**bad args**</div>' 214 + ) in html 215 + 216 + 175 217 def test_chat_event_anchor_ids_are_stable(journal_copy, monkeypatch): 176 218 day = "20990102" 177 219 _set_today(monkeypatch, "20990103")
+4
apps/chat/workspace.html
··· 45 45 font-size: 0.9em; 46 46 margin-top: 4px; 47 47 } 48 + 49 + .chat-talent-card-detail--markdown[data-markdown="1"] { 50 + visibility: hidden; 51 + } 48 52 </style> 49 53 50 54 <script>