---
id: TASK-75
title: 'Three-state FUN: Present → Forgotten → Deleted'
status: Done
assignee: []
created_date: '2026-03-01 19:44'
labels:
  - canvas
  - FUN
  - UX
dependencies: []
references:
  - lib/folk-shape.ts
  - lib/community-sync.ts
  - server/community-store.ts
  - website/canvas.html
priority: medium
---

## Description

<!-- SECTION:DESCRIPTION:BEGIN -->
Shapes now have three visual states instead of two. "Forgetting" a shape fades it (35% opacity, greyscale) for all connected clients rather than hiding it. Other users can choose to "forget too", "remember" (restore), or "delete" (hard-remove). A forgottenBy map (DID → timestamp) tracks who forgot, enabling social signaling around shared attention. Automerge handles concurrent map writes cleanly.
<!-- SECTION:DESCRIPTION:END -->

## Acceptance Criteria
<!-- AC:BEGIN -->
- [ ] #1 Close a shape → fades (greyscale, 35% opacity) for all connected clients
- [ ] #2 Another user sees faded shape, right-click → 'Forget too' or 'Remember'
- [ ] #3 'Remember' restores to full color for everyone
- [ ] #4 Right-click faded shape → 'Delete' → disappears, shows in memory panel 'Deleted'
- [ ] #5 Memory panel 'Restore' on deleted shape → back to present
- [ ] #6 Memory panel shows forget count per shape
- [ ] #7 Backward compatible with legacy forgotten boolean
<!-- AC:END -->

## Final Summary

<!-- SECTION:FINAL_SUMMARY:BEGIN -->
Implemented three-state FUN system across 4 files:\n\n- **folk-shape.ts**: Added `:state(forgotten)` CSS (opacity 0.35, grayscale 0.8) and `forgotten` property with getter/setter toggling ElementInternals states\n- **community-sync.ts**: New methods: `forgetShape(id, did)`, `rememberShape()`, `hardDeleteShape()`, `getShapeVisualState()`, `hasUserForgotten()`, `getFadedShapes()`, `getDeletedShapes()`. Updated `#applyDocToDOM` (renders faded, skips deleted) and `#applyPatchesToDOM` (emits `shape-state-changed`)\n- **community-store.ts**: `forgetShape()` adds DID to `forgottenBy` map; `rememberShape()` clears map + deleted flag\n- **canvas.html**: Right-click context menu (Forget/Remember/Forget too/Delete), two-section memory panel (Fading with forget count + Deleted with Restore), close button fades instead of removes, Delete key escalates (forget → hard-delete)\n\nCommit: 317bc46 on dev, merged to main.
<!-- SECTION:FINAL_SUMMARY:END -->
