Skip to content

Integrate shared package and pending app updates - #113

Merged
jaywedgeworth22 merged 19 commits into
mainfrom
codex/congress-trading-shared-integration-20260629
Jun 30, 2026
Merged

Integrate shared package and pending app updates#113
jaywedgeworth22 merged 19 commits into
mainfrom
codex/congress-trading-shared-integration-20260629

Conversation

@jaywedgeworth22

@jaywedgeworth22 jaywedgeworth22 commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Integrates the shared contract package, admin diagnostics/cross-app manifest updates, and app/workflow hardening.\n\nLocal verification:\n- npm ci\n- npm run typecheck\n- npm test (66 files, 612 tests)


Note

Medium Risk
Production deploy and preview workflows plus Sentry on the Worker entrypoint affect release and observability paths; CI now hard-requires GH_PAT for installs. Capabilities/diagnostics are additive and token-gated.

Overview
Adds @jaywedgeworth22/congress-trading-shared (pinned GitHub dep) and @sentry/cloudflare, wraps the Worker in Sentry.withSentry, and documents SENTRY_DSN in dev vars.

Introduces token-gated GET /api/export/capabilities (integration contract, import limits, endpoints—no secret echo) plus docs for sibling apps; extends admin diagnostics with provider usage from securities_ref and separate price / SPX / performance cache connection rows.

GitHub Actions expand materially: CI on Node 22 with GH_PAT for private npm ci, npm audit, new CodeQL, gitleaks (fork/bot guards), manual production deploy (deploy-production confirm), staging preview deploy, 5‑minute uptime health → incident issues, Dependabot for app/, and Codex autofix refactored to a reusable workflow in congress-trading-shared.

Dashboard changes: draggable column reorder, colgroup/width sync, theme in account menu, admin tab always visible with token-based access, review copy (“Resolved Reviews” / “All Filing Decisions”), and assorted table/layout polish.

Reviewed by Cursor Bugbot for commit 21a8134. Configure here.

jaywedgeworth22 and others added 14 commits June 28, 2026 23:44
Replace duplicated types (Chamber, Owner, TxType, SecurityRef, MktCapBucket)
with imports from the cross-app shared package. Add contracts.ts barrel
re-exporting all shared types, schemas, constants, and utilities.

Files changed:
- src/shared/types.ts — import Chamber/Owner/TxType from shared
- src/enrichment/types.ts — import SecurityRef/MktCapBucket from shared
- src/enrichment/compute.ts — import marketCapBucket from shared
- src/analytics/compute.ts — import bracketMidpoint from shared
- src/analytics/sql.ts — import PartyBucket/WINDOW_PRESETS from shared
- src/shared/contracts.ts (new) — barrel re-exports for shared package
- package.json — add shared package dep

Verification: npx tsc --noEmit — 0 errors
Docs: docs/rollouts/2026-06-29-congress-trading-shared.md
Co-authored-by: Cursor <cursoragent@cursor.com>
…into codex/congress-trading-shared-integration-20260629
…29' into codex/congress-trading-shared-integration-20260629

# Conflicts:
#	app/src/admin/routes.ts
#	app/src/shared/types.ts
#	app/src/ui/dashboardHtml.ts
…-20260629' into codex/congress-trading-shared-integration-20260629
…s-trading-shared-integration-20260629

# Conflicts:
#	app/package-lock.json
#	app/package.json
@cursor

cursor Bot commented Jun 30, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_7e7dcb14-b7d6-44ec-9e41-ea9a1e267710)

@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: 21a81344c4

ℹ️ 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 .github/workflows/deploy.yml
Comment thread .github/workflows/uptime-monitor.yml Outdated
Comment thread app/src/export/routes.ts Outdated
Comment thread app/src/ui/dashboardHtml.ts
Comment thread .github/workflows/deploy-staging.yml
@jaywedgeworth22
jaywedgeworth22 merged commit 3317b42 into main Jun 30, 2026
2 checks passed
@jaywedgeworth22
jaywedgeworth22 deleted the codex/congress-trading-shared-integration-20260629 branch June 30, 2026 02:03

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

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

<button data-view="review" data-mobile="Review" data-icon="✓" data-admin-tab="true" hidden>Review Queue <span id="reviewCount"></span></button>
<button data-view="subs" data-mobile="Alerts" data-icon="↗">Subscriptions</button>
<button data-view="admin" data-mobile="Admin" data-icon="⚙" data-admin-tab="true" hidden>Admin · Cadence</button>
<button data-view="admin" data-mobile="Admin" data-icon="⚙">Admin · Cadence</button>

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 Clear admin panels when token is removed

Because the Admin tab is no longer part of the data-admin-tab set, applyAdminVisibility() will not move the user away from it when clearAdminToken() removes the saved bearer token. If an operator clears a token while the Admin tab is active, the previously loaded health/diagnostics/user panels remain visible in the DOM without a valid admin context; keep this view in the admin reset path or clear/reload its contents when the token is removed.

Useful? React with 👍 / 👎.

env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
ADMIN_TOKEN: ${{ secrets.ADMIN_TOKEN }}

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 Fail deploy when migration token is missing

In a GitHub Actions run where ADMIN_TOKEN is absent or renamed, this expands to an empty env var; scripts/ship.sh treats that as optional and skips POST /api/admin/migrate while still exiting successfully. That can deploy production code without applying the canonical idempotent schema path, so add a preflight that fails the workflow when the admin migration token is not available.

Useful? React with 👍 / 👎.

Comment thread .github/dependabot.yml
@@ -0,0 +1,18 @@
version: 2
updates:
- package-ecosystem: npm

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 Provide Dependabot access to private package auth

GitHub's Dependabot-on-Actions docs state that Dependabot-triggered pull_request runs are treated like fork runs and do not receive normal Actions secrets; this new npm Dependabot config will therefore open PRs whose CI cannot read SHARED_PACKAGE_DEPLOY_KEY or GH_PAT in the private-dependency setup step and exits before npm ci. Add matching Dependabot secrets or route Dependabot PRs through a workflow path that does not require the private package credentials.

Useful? React with 👍 / 👎.

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.

1 participant