Skip to content

Statamic addon: live comments, editing warnings and live preview on any device - #1

Merged
deflinhec merged 1 commit into
mainfrom
claude/project-thread-tmzd7z
Nov 1, 2026
Merged

deflinhec merged 1 commit into
mainfrom
claude/project-thread-tmzd7z

Conversation

@deflinhec

Copy link
Copy Markdown
Member

Requested by Danny · project thread

First version of hibira-io/statamic, a Statamic 5 and 6 addon built on hibira-io/laravel.

What it adds

  • Who else is here: avatars of everyone with the same entry open, and a warning card when one of them saves it. Console saves (imports, scheduled publishing) send nothing.
  • Live comments on entries: add, resolve, reopen, delete (author or super user). Anyone who may view the entry can comment. Stored as one JSON file per entry, so no database is needed.
  • Live preview on any device: a QR code and link of the editor's live preview. A preview page opened outside the control panel reloads on every change and keeps its scroll position. It listens on a public channel named after a keyed hash of the preview token, and events are sent only while such a page is open.
  • With BROADCAST_CONNECTION=hibira, Statamic's own control panel Echo client is pointed at Hibira, so statamic/collaboration works as it is.
  • English, 繁體中文, 简体中文, 日本語, 한국어, ไทย, Tiếng Việt.

How

  • The control panel script is plain DOM, served from the package (nothing to publish or build), so one bundle works on Statamic 5 (Vue 2) and 6 (Inertia SPA).
  • Presence subscriptions are signed on our own control panel route against Statamic's view permission, independent of the app's broadcasting setup.
  • The package is named statamic, so Statamic's automatic config and translation namespaces would collide with its own. Both load under hibira-statamic instead.

Verified

  • 25 PHPUnit tests pass on Statamic 6.39 (Laravel 13) and 5.74 (Laravel 12). CI runs four Statamic/Testbench/PHP combinations and checks that dist/ matches the source.
  • End to end on a fresh statamic/statamic site with a local server built from pusher-server: two users see each other's avatars, comments arrive live both ways, resolve updates the count, the saved warning appears when the other user saves, and an iPhone-sized page opened from the QR link reloaded with the new title after typing in the control panel.

Comments and saved warning


Generated by Claude Code

…ny device

Adds the hibira-io/statamic addon for Statamic 5 and 6:

- Avatars of everyone with the same entry open, and a warning when one
  of them saves it (EntrySaved, CP requests only).
- Live comments on entries in one JSON file per entry, checked against
  Statamic's view permission; resolve, reopen, delete (author or super).
- Live preview on other devices: QR code and link of the editor's live
  preview; preview pages opened outside the CP reload on every change
  via a keyed-hash public channel, sent only while such a page is open.
- With BROADCAST_CONNECTION=hibira, Statamic's own CP Echo client is
  pointed at Hibira (statamic/collaboration works as is).
- The CP script is served from the package (nothing to publish) and is
  plain DOM, so one bundle works on Statamic 5 (Vue 2) and 6 (Inertia).
- English, zh-TW, zh-CN, ja, ko, th, vi.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SHtsCBC9YKFZJN7QeoQnHs
@deflinhec deflinhec self-assigned this Nov 1, 2026
@deflinhec
deflinhec marked this pull request as ready for review November 1, 2026 15:48
@deflinhec
deflinhec merged commit 347c415 into main Nov 1, 2026
5 checks passed
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.

2 participants