Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Feature: post-save "publishing" notice / `onCommit` hook so editors know changes aren't live yet

未关闭
#1,643 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
52/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript

调研方向

Start by tracing the GitHub storage save flow and the existing toastQueue mentioned in the proposal. Compare the smallest built-in notice option with the client-side onCommit hook, and check how UI configuration is defined and tested. Done means editors receive a clear post-save publishing notice or hosts can reliably respond to a successful commit; the issue leaves the preferred option open.

由索引模型根据 Issue 内容生成。

描述

Problem

In github storage mode, "Save" creates a commit and Keystatic shows Saved. For non-technical editors this reads as "it's live", but the site only updates after CI/CD finishes (for us: a GitHub Actions deploy that debounces saves for 45 s, then builds and publishes, ~2–3 min total). Editors reload the public site right away, see nothing, and assume the save failed; some re-save several times.

Related: #223 (batch deployments, closed → decoupled commits from editing, which doesn't address the feedback gap), #1541 (ready-to-publish flag), #1633 (list view not refreshing after save).

What we do today (workaround)

An Astro middleware injects a small script into /keystatic that wraps window.fetch, detects the createCommitOnBranch mutation succeeding, and shows a toast: "Saved. Publishing… it takes about 2–3 minutes to appear on the site." It works but depends on Keystatic internals.

Proposal (any of these would do)
  1. Config hook — ui: { onCommit?: (info: { branch: string; collection?: string; slug?: string; sha: string }) => void } (client-side). Hosts can show their own notice, start a countdown, or poll their own deploy status.
  2. Built-in notice — ui: { publishNotice?: { message: string } } shown as a toast via the existing toastQueue after a successful commit, with {branch} interpolation. Zero code for most users.
  3. (Later) ui.deployStatus?: () => Promise<'building' | 'live'> polled by Keystatic to show a status pill, letting each site decide what to expose.

Option 2 is the smallest change and covers the most common case: a static message. Happy to open a PR for 1 or 2 if there's interest.

主要语言
TypeScript
星标
2.5k
派生
171
平均合并
5 小时 46 分钟
30 天内合并 PR
3

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Thinkmill/keystatic 的其他 Issue

查看 Thinkmill/keystatic 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。