personal memory agent
0
fork

Configure Feed

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

Fix placeholder tests to account for import nudge priority

The _resolve_placeholder function now shows an import nudge before
"Capture is running" for young journals without imports. Update tests
to set has_imported=True where they test post-import placeholder paths,
and add new test cases for the import nudge itself.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+23 -4
+3 -1
tests/test_observation.py
··· 332 332 333 333 start_onboarding("a") 334 334 update_state("onboarding", {"status": "complete"}) 335 + update_state("imports", {"has_imported": True}) 335 336 placeholder = self._get_placeholder() 336 337 assert "Capture is running" in placeholder 337 338 338 339 def test_skipped_placeholder(self): 339 - from think.awareness import skip_onboarding 340 + from think.awareness import skip_onboarding, update_state 340 341 341 342 skip_onboarding() 343 + update_state("imports", {"has_imported": True}) 342 344 placeholder = self._get_placeholder() 343 345 assert "Capture is running" in placeholder 344 346
+20 -3
tests/test_onboarding.py
··· 194 194 result = _resolve_placeholder("interviewing", {}, 0) 195 195 assert "Tell me about" in result 196 196 197 - def test_complete_no_daily(self): 197 + def test_complete_no_imports_young(self): 198 198 from convey.apps import _resolve_placeholder 199 199 200 200 result = _resolve_placeholder("complete", {}, 0) 201 + assert "Bring in past conversations" in result 202 + 203 + def test_complete_no_daily(self): 204 + from convey.apps import _resolve_placeholder 205 + 206 + current = {"imports": {"has_imported": True}} 207 + result = _resolve_placeholder("complete", current, 0) 201 208 assert "Capture is running" in result 202 209 203 210 def test_complete_first_daily_young(self): 204 211 from convey.apps import _resolve_placeholder 205 212 206 - current = {"journal": {"first_daily_ready": True}} 213 + current = { 214 + "imports": {"has_imported": True}, 215 + "journal": {"first_daily_ready": True}, 216 + } 207 217 result = _resolve_placeholder("complete", current, 1) 208 218 assert "first daily analysis is ready" in result 209 219 ··· 222 232 result = _resolve_placeholder("complete", current, 10) 223 233 assert "Ask me about your day" in result 224 234 235 + def test_skipped_no_imports_young(self): 236 + from convey.apps import _resolve_placeholder 237 + 238 + result = _resolve_placeholder("skipped", {}, 0) 239 + assert "Bring in past conversations" in result 240 + 225 241 def test_skipped_no_daily(self): 226 242 from convey.apps import _resolve_placeholder 227 243 228 - result = _resolve_placeholder("skipped", {}, 0) 244 + current = {"imports": {"has_imported": True}} 245 + result = _resolve_placeholder("skipped", current, 0) 229 246 assert "Capture is running" in result 230 247 231 248 def test_skipped_with_daily_mature(self):