Skip to content

feat(notifications): expose delivery and ACK evidence - #86

Open
chuanxu742-glitch wants to merge 1 commit into
2233admin:mainfrom
chuanxu742-glitch:codex/notification-delivery-evidence
Open

feat(notifications): expose delivery and ACK evidence#86
chuanxu742-glitch wants to merge 1 commit into
2233admin:mainfrom
chuanxu742-glitch:codex/notification-delivery-evidence

Conversation

@chuanxu742-glitch

Copy link
Copy Markdown

Closes #84

Product outcome

  • Adds a dedicated delivery-evidence section to the notification center.
  • Separates technical channel submission from downstream business ACK semantics.
  • Shows rule, transport state, ACK state, record id, time, and an allow-listed safe error summary without rendering raw response or ACK payloads.
  • Keeps rule management usable when log loading fails, and preserves already-loaded rows when refresh or load-more requests fail.

Operability and data integrity

  • Adds pagination for both rules and delivery attempts, exact rule lookup for log rows outside loaded rule pages, and stable-id deduplication for offset pagination overlap.
  • Refreshes both rule and log caches after cascaded rule deletion.
  • Warns before rule deletion that all associated delivery evidence is permanently removed.
  • Treats provisional not_required ACK values according to transport state while allowing a real downstream ACK to override a transport-side timeout/failure inference.

Verification

  • node --experimental-strip-types --test scripts/notification-delivery-status.test.mjs scripts/check-notification-evidence-regressions.mjs — 14/14 passed
  • node node_modules/typescript/bin/tsc --noEmit — passed
  • targeted ESLint — 0 errors
  • node node_modules/next/dist/bin/next build — passed, 42/42 pages generated
  • git diff --check — passed
  • independent verifier review — no findings after two review/fix cycles

@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 25 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: faa5ea95-cbcc-45b4-96a5-474a93248c35

📥 Commits

Reviewing files that changed from the base of the PR and between b9ec317 and 47c3cdc.

📒 Files selected for processing (6)
  • frontend/app/(app)/notifications/page.tsx
  • frontend/lib/api/endpoints.ts
  • frontend/lib/api/hooks.ts
  • frontend/lib/notifications/delivery-status.ts
  • frontend/scripts/check-notification-evidence-regressions.mjs
  • frontend/scripts/notification-delivery-status.test.mjs

Warning

Your free Security trial is over. An organization admin can activate billing to continue.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@repowise-bot

repowise-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown

✅ Health of changed files: 4.1 → 4.9 (+0.8)
🚨 Change risk: high, riskier than 82% of this repo's commits.

📋 At a glance
1 file changed health · 3 hotspots touched · 2 new findings introduced · 2 co-change pairs left out · 10 dead-code findings. Scoped to frontend.

✅ Health gate: passed

📌 Before you merge

  • .../api/types.ts changed together with .../api/endpoints.ts in 13 past commits and isn't in this PR
  • frontend/lib/navigation.ts changed together with .../api/hooks.ts in 10 past commits and isn't in this PR
🔎 More signals (4)

🗺️ Change map

flowchart LR
  subgraph PR ["Changed in this PR (2 with dependents)"]
    f_frontend_lib_api_endpoints_ts[".../api/endpoints.ts 🔥"]:::changed
    f_frontend_lib_api_hooks_ts[".../api/hooks.ts 🔥"]:::changed
  end
  f_backend_api_v1_workflows_py[".../v1/workflows.py"]
  f_frontend_lib_api_endpoints_ts --> f_backend_api_v1_workflows_py
  f_backend_models___init___py["backend/models/__init__.py"]
  f_frontend_lib_api_endpoints_ts --> f_backend_models___init___py
  f_backend_schemas_workflow_py["backend/schemas/workflow.py"]
  f_frontend_lib_api_endpoints_ts --> f_backend_schemas_workflow_py
  f_backend_workflow_capability_projection_py["backend/workflow/capability_projection.py"]
  f_frontend_lib_api_endpoints_ts --> f_backend_workflow_capability_projection_py
  f_frontend_lib_api_hooks_ts --> f_backend_api_v1_workflows_py
  f_frontend_lib_api_hooks_ts --> f_backend_models___init___py
  f_frontend_lib_api_hooks_ts --> f_backend_schemas_workflow_py
  f_frontend_lib_api_hooks_ts --> f_backend_workflow_capability_projection_py
  more(["+89 more dependents"])
  PR --> more
  w_frontend_lib_api_types_ts(["⚠️ .../api/types.ts changed together 13×, not in PR"]):::warn
  f_frontend_lib_api_endpoints_ts -.- w_frontend_lib_api_types_ts
  w_frontend_lib_navigation_ts(["⚠️ frontend/lib/navigation.ts changed together 10×, not in PR"]):::warn
  f_frontend_lib_api_hooks_ts -.- w_frontend_lib_navigation_ts
  classDef changed fill:#dbeafe,stroke:#1d4ed8,color:#1e3a5f
  classDef warn fill:#fef3c7,stroke:#b45309,color:#78350f
  classDef guard fill:#dcfce7,stroke:#15803d,color:#14532d
Loading

Solid arrows: code that imports the changed files (93 direct dependents, from the last indexed snapshot). Dashed: history/tests.

🔥 Hotspots touched (3)

  • .../api/endpoints.ts: 19 commits/90d, 49 dependents · primary owner: lunnt (49%)
  • .../api/hooks.ts: 23 commits/90d, 78 dependents · primary owner: Curry (42%)
  • .../notifications/page.tsx: 5 commits/90d, 0 dependents · primary owner: lunnt (51%)

🔗 Hidden coupling (2 files)

  • .../api/endpoints.ts co-changes with .../api/types.ts (13×, 🟡 notable), not in this PR.
  • .../api/hooks.ts co-changes with these files (not in this PR):
    • .../api/types.ts (13×, 🟡 notable)
    • frontend/lib/navigation.ts (10×, 🟡 notable)

💀 Dead code (10 findings)

  • 💀 .../api/endpoints.ts listMyWorkspaces (confidence 1.00)
  • 💀 .../api/endpoints.ts listGovernedWorkspaces (confidence 1.00)
  • 💀 .../api/endpoints.ts listProjectWorkflowVersions (confidence 1.00)
7 more
  • 💀 .../api/endpoints.ts getOperationsAgentVersion (confidence 1.00)
  • 💀 .../api/endpoints.ts createSource (confidence 1.00)
  • 💀 .../api/endpoints.ts deleteSource (confidence 1.00)
  • 💀 .../api/endpoints.ts testSourceConnectivity (confidence 1.00)
  • 💀 .../api/endpoints.ts setSourceObjective (confidence 1.00)
  • 💀 .../api/endpoints.ts getRecord (confidence 1.00)
  • 💀 .../api/endpoints.ts deleteRecord (confidence 1.00)

👀 Suggested reviewers @2233admin


📊 See the full report for this PR
Your repo map with this PR's blast radius lit up, every caller of the contracts it changes, and health before and after. No sign-in. · ⭐ Star Repowise · 📥 Install bot · Silence on a single PR with [skip repowise] in the title · Per-repo toggle on repowise.dev/settings?tab=bot · Updated 2026-08-26 14:57 UTC

@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: 47c3cdc015

ℹ️ 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 frontend/lib/api/hooks.ts
Comment on lines +770 to +773
queryFn: ({ pageParam }) => api.listNotificationRules({ ...params, page: pageParam }),
getNextPageParam: (lastPage) => {
const meta = lastPage.meta
return meta && meta.page < meta.pages ? meta.page + 1 : undefined

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 Add a stable order before paging notification rules

When more than 50 rules exist, this fetches successive offset pages from list_rules, but the backend query in backend/api/v1/notifications.py:40-42 applies OFFSET/LIMIT without any ORDER BY. SQL does not guarantee a consistent row order between requests, so loading the next page can duplicate already displayed rules and permanently omit others; the client-side deduplication only hides duplicates and cannot recover skipped rules. Add a deterministic backend ordering (ideally with a unique tie-breaker) before relying on this infinite query.

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.

feat(notifications): expose delivery attempts and ACK evidence in notification center

1 participant