mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
feat(settings): CEO display name is configurable, Renzo hardcode removed (#612)
The header chip and the Settings User Info card rendered a literal 'Renzo'. The name now lives in the system_settings store under ceo_name (validated: trimmed, non-empty, max 60 chars) with the same client-served default the transcript-retention card uses, editable inline from the User Info card. Agent prompts already refer to 'the CEO' generically, so no prompt rewiring; the two agent-facing RAG docs drop the name too. License/CLA copyright is untouched. Co-authored-by: Renn F <rennf93@users.noreply.github.com>
This commit is contained in:
@@ -25,6 +25,14 @@ def test_validate_retention_requires_positive_int() -> None:
|
||||
validate_setting("transcript_retention_days", "abc")
|
||||
|
||||
|
||||
def test_validate_ceo_name_requires_nonempty_bounded_string() -> None:
|
||||
validate_setting("ceo_name", "Alice") # ok, no raise
|
||||
with pytest.raises(SettingValidationError):
|
||||
validate_setting("ceo_name", " ")
|
||||
with pytest.raises(SettingValidationError):
|
||||
validate_setting("ceo_name", "x" * 61)
|
||||
|
||||
|
||||
_DEFAULT_RETENTION = 14
|
||||
_NEW_RETENTION = 30
|
||||
|
||||
@@ -54,3 +62,18 @@ async def test_set_rejects_invalid_value(db_session: Any) -> None:
|
||||
svc = get_settings_service(db_session)
|
||||
with pytest.raises(SettingValidationError):
|
||||
await svc.set("transcript_retention_days", "-5")
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_ceo_name_set_then_get_roundtrips(db_session: Any) -> None:
|
||||
svc = get_settings_service(db_session)
|
||||
assert await svc.get("ceo_name") is None # unset, panel supplies fallback
|
||||
await svc.set("ceo_name", "Alice")
|
||||
assert await svc.get("ceo_name") == "Alice"
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_ceo_name_set_rejects_blank_value(db_session: Any) -> None:
|
||||
svc = get_settings_service(db_session)
|
||||
with pytest.raises(SettingValidationError):
|
||||
await svc.set("ceo_name", " ")
|
||||
|
||||
Reference in New Issue
Block a user