Skip to content

prototype(portal): people catch up on unread deployment updates - #551

Closed
vsrikar08 wants to merge 12 commits into
mainfrom
prototype/record-log/github-action-history
Closed

vsrikar08 wants to merge 12 commits into
mainfrom
prototype/record-log/github-action-history

Conversation

@vsrikar08

Copy link
Copy Markdown
Collaborator

What changed

People can catch up on changes from confirmed successful Deploy GitHub Actions in a local notification prototype. Main updates and pull requests do not create changelog entries.

  • Shared, plain-language deployment notes; failed deployments excluded and retries deduplicated.
  • Bell lists every unread update. Each update has Read/Unread state, with Mark all as read in the bell and history.
  • Expandable history, newest first, with 10 updates per page. Read state survives reopening tabs.

Continues #550 on this branch; tracks #548. Local prototype only—no production deployment or production history publication. Live generated-note quality and importer recovery checks remain follow-up work.

How it was verified

  • Added or updated tests covering this change
  • 14 notification browser tests, 8 focused rendering/route tests and 66 portal tests pass. Typechecking and lint pass.
  • Manually verified 22 fresh local simulations, individual reads, unread reversal and marking all across pages.
  • pnpm test passes locally

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

Additive prototype; no database migration or public CLI/API contract changes.

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
@vsrikar08
vsrikar08 marked this pull request as ready for review October 6, 2026 06:21
@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:28:32.803926Z e805873 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: e805873d64

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

return HttpServerResponse.jsonUnsafe(
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 provenance from the latest-updates response

When the history comes from the deployment importer, result.success[0] retains its deployment object, so any signed-in member can call /updates/latest and receive the run ID, attempt, commit SHA, and Actions URL. This bypasses the field projection used by /updates/feed and violates the documented contract that deployment provenance remains internal; remove this unused route or project the entry to the same display-only fields as the feed.

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

Useful? React with 👍 / 👎.

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 Keep the local prototype off production app shells

In a normal production session every app-shell viewer has a user ID, so this condition always injects the updates client despite docs/product.md defining deployment updates as a local prototype with production publication out of scope. Consequently every production tab displays an unpublished bell and polls the authenticated /updates/feed route every five seconds, repeatedly resolving the viewer and reading the content store even when no production history exists; gate the shell and routes behind an explicit prototype/dev setting.

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

Useful? React with 👍 / 👎.

Comment on lines +219 to +220
async readLog(jobId) {
return gh(["api", `${prefix}/jobs/${jobId}/logs`, "--allow-escape-sequences"]);

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 Remove the unsupported flag from job-log reads

For every uncached successful deployment, this invokes gh api with --allow-escape-sequences, so the importer exits before it can establish the deployed revision. The installed gh 2.96 documentation for gh api --help lists flags such as --paginate and --slurp but not this flag, and the exact invocation terminates with unknown flag: --allow-escape-sequences; because gh() converts that failure into a generic Actions-read error, the initial sync can never import a deployment. Remove the unsupported flag and process the raw log output separately if escape handling is needed.

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