Skip to content

feat(portal): record updates from successful Deploy actions - #554

Closed
vsrikar08 wants to merge 13 commits into
mainfrom
feat/record-log
Closed

vsrikar08 wants to merge 13 commits into
mainfrom
feat/record-log

Conversation

@vsrikar08

Copy link
Copy Markdown
Collaborator

What changed

Adds a shared Patchy update history sourced from successful, release-confirmed GitHub Deploy Action attempts. The bell lists every unread update, individual read state appears in history, and people can mark all updates read; the history is paginated ten entries at a time. Deployment history writes remain local to the dev instance.

Continues the update-history work tracked by #548 and #550. Nothing was deployed to production.

How it was verified

  • Added or updated tests covering this change
  • 20 focused tests pass across update routes, rendering, and Deploy Action history import.
  • Notification browser tests, typechecking, lint, and local manual simulation checks passed.
  • Full pnpm verify remains red on unrelated formatting, execution/CLI tests and the Linux-only fleet browser check on macOS.

Release impact

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

This change adds local dev history and browser read markers without database migrations or public CLI/API changes.

Model: GPT-6. Harness: Codex.

@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-06T17:34:38.895470Z 2054e8d New commits
ℹ️ 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.

@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 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: f4a03dae35

ℹ️ 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".

Comment thread packages/auth/src/page.ts
Comment on lines +65 to +68
const hasUpdates = page.app?.viewer.user.id !== undefined;
const head =
(shell && clerk ? sessionScripts(shell) : "") +
(hasUpdates ? '<script defer src="/updates/client.js"></script>' : "");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Gate the update client to the local prototype

On every real signed-in app page viewer.user.id is defined, so this condition injects the updates client in production as well as local development. The client polls /updates/feed every five seconds (updatesScript.ts:158), and every request repeats viewer resolution plus ContentStore.get; because production publication is explicitly outside scope (docs/product.md:293), even a missing history object creates continuous authentication, SQL, and S3 traffic for every open tab. Add an environment or feature gate so this local prototype cannot impose production load.

AGENTS.md reference: AGENTS.md:L45-L45

Useful? React with 👍 / 👎.

Comment thread packages/core/src/html.ts
Comment on lines +711 to +714
.updates-popover-top h2 {
margin: 0;
font-size: 1rem;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep the popover heading on shared heading styles

This selector changes the shared .section-heading margin and font size specifically inside the update popover. The served-page contract requires first-party pages to reuse the shared component set and forbids page-specific heading typography; leave section-heading unchanged or introduce a named shared variant instead of overriding it here.

AGENTS.md reference: AGENTS.md:L80-L80

Useful? React with 👍 / 👎.

Comment on lines +42 to +44
result._tag === "Failure"
? { error: "Updates unavailable" }
: { viewerId: viewer.user.id, latest: result.success[0] ?? null },

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Strip deployment provenance from the latest response

When history comes from the new importer, every entry contains a deployment object, and updates.read preserves its run ID, attempt, commit, and Actions URL. Returning result.success[0] directly therefore exposes that internal provenance to any signed-in reader of /updates/latest, contrary to the documented browser boundary; project the latest entry to the same display-only fields used by /updates/feed or remove this unused endpoint.

AGENTS.md reference: AGENTS.md:L45-L45

Useful? React with 👍 / 👎.

Comment on lines +23 to +27
# Keep the generator at the workflow revision; the evidence reads the explicit range.
- uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: false

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 Protect the API key from branch-dispatched code

GitHub permits a manual workflow to run against a selected non-default branch or --ref, and this checkout deliberately executes that workflow revision’s local action and scripts/release-notes.mjs. Because the following step passes RELEASE_NOTES_API_KEY, anyone with repository write access can modify those files on an unmerged branch, dispatch this workflow for that branch, and run arbitrary code with the API key. Put the secret in an environment restricted to trusted deployment branches, or otherwise ensure branch-dispatched code cannot receive it.

Useful? React with 👍 / 👎.

@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: 2054e8d86a

ℹ️ 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".

Comment on lines +119 to +121
row.addEventListener("toggle", () => {
if (!row.open) acknowledged.delete(row);
else void refresh();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve reads when details close before refresh

When a person expands and collapses an entry before the in-flight /updates/feed request finishes, as can happen on first load or a slow connection, the open event only starts the refresh and completion calls readOpenRows(), which skips the now-closed row. No read marker is written, so the update remains unread even though its details were opened. Retain a pending sequence through feed validation and mark it read regardless of whether the row is still open.

AGENTS.md reference: AGENTS.md:L45-L45

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