Skip to content

🐛 fix(bots): keep missing saved timeline images and center time fields (#692) - #357

Merged
notFrost merged 1 commit into
feat/bot-icon-timelinefrom
fix/bot-icon-rules-missing-image
Dec 1, 2026
Merged

notFrost merged 1 commit into
feat/bot-icon-timelinefrom
fix/bot-icon-rules-missing-image

Conversation

@notFrost

@notFrost notFrost commented Dec 1, 2026

Copy link
Copy Markdown

Part of notFrost/sophie#692 (phase 4, stage B2c).

Fixes

1. A missing saved image no longer blocks Save (spec §3). storeImage rejected any stored reference whose file was gone, so once a timeline image's file disappeared, every save of that Bot's rules failed until the user removed or replaced that tile. storeIconRules now takes the Bot's saved rules. A reference already in the saved timelines skips the file check and stays in the record as-is. A reference not in the saved rules is still rejected if its file is missing. The png/jpeg/webp type check still runs on every reference. The Default Icon path (storeIcon) and removeAvatarsExcept / avatarPath are unchanged.

2. Time fields are centered (spec §2.5). BotIconTimeField now centers its text by default, so the timeline start fields and the shapes after field both pick it up.

Verification

New BotService test: saving rules that keep a saved reference whose file was deleted succeeds and keeps the reference, and an unknown reference with no file is still rejected. Before the fix this test failed with This Bot has no stored avatar with that reference.

vp run typecheck:

vp run: 0/44 cache hit (0%), 44/44 successful.

vp test run apps/server/src/bots:

 Test Files  9 passed (9)
      Tests  88 passed (88)

No Windows worktree failures this run.

env -u NODE_ENV vp test run src/components/bots/BotIconRuleParts.browser.test.tsx (adds a text-align: center assertion):

 Test Files  1 passed (1)
      Tests  5 passed (5)

Pre-commit hook: fmt, lint and knip all passed.

Out of scope

No changes to BotAvatar.tsx, BotRuleShapesSection.tsx, contracts, the display or the evaluator.

🤖 Generated with Claude Code

@notFrost

notFrost commented Dec 1, 2026

Copy link
Copy Markdown
Author

Review (Lukas): approved, merging into feat/bot-icon-timeline. Light review: the diff against the brief, plus the pasted checks.

  • Fix 1: only references in the Bot's saved timelines skip the file-exists check. New Bots pass DEFAULT_BOT_ICON_RULES, so they get no exemption. The type check stays for every reference, and storeIcon is unchanged.
  • Fix 2: *:text-center reaches the inner input. The browser test asserts the computed alignment.
  • Checks, pasted on a base equal to the current integration head:
    • typecheck 44/44;
    • server bots tests 88/88;
    • BotIconRuleParts browser tests 5/5;
    • the hooks passed.

@notFrost
notFrost merged commit 24e9c4d into feat/bot-icon-timeline Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant