Keep the home memo form when the decision overview fails

The overview is orientation only; a store, policy or engine failure while
listing now shows a notice instead of an error page, so the memo form and
sign-out stay reachable.

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

Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 359683@bnt-lap001
Assistant-Session: eebdc939-7a9b-4e50-9d39-c8437e8a14ec
This commit is contained in:
tegwick 2026-09-21 22:12:27 +02:00
parent 002a486ecf
commit 3e0d3d5ebf
2 changed files with 22 additions and 1 deletions

View file

@ -407,3 +407,11 @@ def test_home_without_session_shows_sign_in_only(review):
r=call(app,'/')
assert 'Sign in with KeyCape' in r['body'] and 'Your decisions' not in r['body']
assert controller.store.policy_observations()==[]
def test_home_keeps_the_memo_form_when_the_overview_fails(review,monkeypatch):
controller,session,app,*_=review
def broken(subject):raise sqlite3.OperationalError('disk')
monkeypatch.setattr(controller.store,'memos_for',broken)
r=home(review)
assert r['status']==200 and 'could not be listed right now' in r['body'] and 'Open a decision review' in r['body']