Skip to content

feat(web): persist link card layouts and reclaim unused previews - #198

Merged
itscheems merged 8 commits into
mainfrom
codex/link-card-layout
Nov 3, 2026
Merged

itscheems merged 8 commits into
mainfrom
codex/link-card-layout

Conversation

@itscheems

@itscheems itscheems commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

Link cards now preserve presentation preferences and retained-draft snapshots while abandoned capture media becomes eligible for automatic cleanup. Existing posts can change presentation without re-fetching or replacing their captured metadata.

Behavior

  • Retained browser drafts save the card snapshot and protect its managed images before confirming a save. Releasing or expiring draft references starts a fresh cleanup grace period when no other references remain. Obsolete preview dismissal state is cleared with its composition.
  • Startup and hourly maintenance reclaim explicitly marked link captures only after at least 24 continuous hours without references. Ordinary uploads retain their existing lifecycle, including shared-byte uploads; unclassified historical media is not inferred from filenames.
  • Presentation preferences survive publication, later edits, portable export/import, merge review, and generated share images. The compact editing control uses the existing accessible menu system. HTTP and CLI support presentation-only updates without resubmitting the snapshot.

Upgrade impact

Migrations 13 and 14 add capture markers, browser-draft media references, and a display preference that defaults older records to the existing cover presentation. Original media bytes are not rewritten. Browser-draft references follow the existing 30-day draft lifetime; expired references receive a fresh 24-hour cleanup grace period. Older executables reject the upgraded schema, so rollback requires a compatible binary retaining schema support or a suitable pre-upgrade database backup.

Validation

  • Full go test ./... and go vet ./... passed for the feature changes; targeted domain, media, and SQLite regressions passed after the cleanup/documentation follow-up.
  • Repository task lint passed, covering the production build, Go vet, golangci-lint, full frontend ESLint, and TypeScript checks.
  • 302 related frontend tests and formatting checks passed. The CI-matching second frontend shard also passed all 842 tests with --shard=2/2 --maxWorkers=2 after correcting keyboard activation in the menu fixtures.
  • Focused race checks passed for media retention, draft ownership, display updates, and HTTP/CLI parity. Archive tests cover preservation of the display preference and managed media references.
  • Real-browser checks covered pointer and touch selection, keyboard focus return, retained-draft restoration, publication, later edits, responsive boundaries, and light/dark themes. Frame sampling confirmed stable card/image nodes and immediate menu dismissal without translucent exit frames or additional resolution requests.

Behavioral assertions were retained. The menu fixtures now focus the trigger, complete the keyboard event sequence, and await the rendered popup before selection. A pre-existing account-ordering test uses a controlled clock to avoid millisecond ties. The complete frontend suite and release pipeline were omitted because the selected tests exercise the affected API, composer, draft, account integration, card rendering, sharing, and localization consumers; backend coverage includes the full Go suite and focused concurrency checks.

Closes #196, Closes #197

Track browser draft references and captured link assets so scheduled maintenance can reclaim abandoned resources without removing retained content. Preserve card snapshots during draft restoration and reset obsolete composer suppression state.

The additive schema migration requires rollback builds to retain support for the new resource tables.
Store presentation independently of captured metadata and preserve it through drafts, reading surfaces, share images, and portability. Reuse the existing composer menu and support metadata-preserving updates through HTTP and CLI.
@itscheems itscheems added kind/feature New features and enhancements moment Moment project codex Created by Codex labels Nov 3, 2026
@itscheems itscheems self-assigned this Nov 3, 2026
Make best-effort cleanup result handling explicit and document exported display helpers.

Refs #196, Refs #197
Model keyboard input from the active trigger and await menu rendering before selecting an option. Preserve the existing draft snapshot and request assertions.

Refs #196, Refs #197
@itscheems
itscheems merged commit d69cea6 into main Nov 3, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex Created by Codex kind/feature New features and enhancements moment Moment project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(web): retain author-selected link card presentation fix(media): bound temporary link preview retention

1 participant