Skip to content

prototype(portal): people see new deployments in a bell and shared update history - #550

Closed
vsrikar08 wants to merge 5 commits into
mainfrom
prototype/record-log/deployment-updates
Closed

vsrikar08 wants to merge 5 commits into
mainfrom
prototype/record-log/deployment-updates

Conversation

@vsrikar08

@vsrikar08 vsrikar08 commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

People returning to Patchy need to see what changed since their last visit. This prototype adds a bell for the newest unread deployment and a shared, newest-first update history with expandable notes, plus a draft-note generator that describes an explicit deployment range instead of every merge to main.

The bell shows All caught up after the displayed history is read and always links to all updates. Everyone reads one document from the content store, outside patch-owned storage and the app database; only the read marker is stored per person in their browser. Local simulation exercises the interaction. A reusable GitHub Action and manual preview workflow prepare user-facing notes from commit evidence without publishing them.

Related to #548. Replaces #549 after renaming the prototype branch. This is a local-simulation progress draft. Deployment to https://cloud.patchyhq.com/ and wiring into the production Deploy workflow are explicitly outside scope.

Progress

  • Integrate the bell and expandable /updates history into the app shell.
  • Store shared history once and preserve browser read state across tab closures.
  • Add local deployment simulation and a draft-note generator with a preview Action.
  • Exercise the real bell and history in eight Chromium browser tests: tab reopening, cross-tab markers, hidden/visible history, newer deployments, storage denial/quota failures, unavailable history and account changes.
  • Verify real generator drafts reach the history reader, bell and expanded details with readable display copy and no internal provenance.
  • Assess real model output locally with RELEASE_NOTES_API_KEY; current sample responses were authored locally.
  • Exercise any further generation/publication simulation locally, using explicit confirmed/target commits, success/failure outcomes, retry deduplication, rollback events and recovery from a failed document write. This does not authorize production wiring or deployment.

How it was verified

  • pnpm test passes locally
  • Added or updated tests covering this change

The integrated prototype was exercised locally. Ten browser tests now pass against disposable real servers, authenticated pages, the served script and the shared content store. Publication is simulated by replacing the history document; focus and visibility events are controlled for headless determinism. Tab closure and cross-tab storage events are real browser behavior. Two compatibility cases additionally use the real draft generator with hand-authored plain-language output, then read and render the resulting shared history. They cover all display categories and neutral initial/maintenance/rollback notes. The prompt asks for everyday words, short sentences and concrete user impact. Test typechecking and focused lint pass; the compatibility test required only a JSDoc correction to the generator's model parameter, with no runtime interface change. The earlier focused portal/HTML checks passed (84 tests), and the release-note generator's 15 focused tests pass, covering explicit commit ranges, merges, rollback/maintenance copy, evidence validation and provider failures. Real repository commit ranges were collected and locally authored responses validated; no live AI generation has been tested yet.

The earlier pnpm verify run passed lint, typechecking, infrastructure synthesis, Postgres concurrency and tier-2 smoke checks. It remains red on formatting in existing untracked files and failures outside this change in the offline, CLI smoke and browser suites, including Linux-only execution checks on macOS. Changed-file formatting and git diff --check pass.

Run the bell checks with pnpm exec playwright test -c playwright.tier1.config.ts --project=chromium updates.spec.ts; screenshots are saved under .local/tier1-results/.

Reproduce the integrated preview in a dedicated worktree with pnpm dev, then pnpm prototype:updates:seed; simulate a new deployment with pnpm prototype:updates:seed --deploy. See packages/portal/prototypes/updates/README.md and docs/OPERATIONS.md#drafting-deployment-notes.

Release impact

  • Breaking — requires action from anyone already running this
  • Not breaking — no action required

Adds read-only update pages and optional draft-generation tooling. No migration or existing CLI contract change is required. The production Deploy workflow is unchanged; the preview generator requires its own API-key secret before live use. Read state is browser-local and does not sync across devices.

Model: GPT-6. Harness: Codex.

@github-actions github-actions Bot added area:server Touches the server area area:ci CI, shared testing infrastructure, development scripts and tooling area:core Touches the core area area:docs Touches the docs area area:ui Portal and first-party browser pages, shared rendering and styles size:xl Over 1,000 changed lines; review in multiple passes labels Oct 6, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-06T06:29:07.721961Z 1e85e8a Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1e85e8a148

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const store = yield* ContentStore.ContentStore;
const document = yield* store
.get(objectKey)
.pipe(Effect.catchTag("ObjectNotFound", () => Effect.succeed('{"version":1,"entries":[]}')));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Replace catchTag for the missing-history case

When the shared history object is absent, this new Effect service consumer handles the known ObjectNotFound variant with singular Effect.catchTag. Use Effect.catchTags({ ObjectNotFound: ... }) instead so this boundary follows the repository’s required tagged-failure convention and remains consistent with the other service consumers.

AGENTS.md reference: AGENTS.md:L98-L103

Useful? React with 👍 / 👎.

@allisonmahmood

Copy link
Copy Markdown
Owner

Closing in favour of the smaller design on #548. The comment there explains the decision. Thanks, Srikar: the writing rules from your release-notes prompt carry over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci CI, shared testing infrastructure, development scripts and tooling area:core Touches the core area area:docs Touches the docs area area:server Touches the server area area:ui Portal and first-party browser pages, shared rendering and styles size:xl Over 1,000 changed lines; review in multiple passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants