Skip to content

feat(pwa): make control panel notification-ready with opt-in model and PWA baseline - #203

Merged
JSONbored merged 6 commits into
JSONbored:mainfrom
jonathanchang31:feat/control-panel-notification-ready
Jun 1, 2026
Merged

feat(pwa): make control panel notification-ready with opt-in model and PWA baseline#203
JSONbored merged 6 commits into
JSONbored:mainfrom
jonathanchang31:feat/control-panel-notification-ready

Conversation

@jonathanchang31

Copy link
Copy Markdown
Contributor

Summary

This PR implements issue #149 by making the control panel notification-ready without adding any native app dependency.

It adds:

  • an authenticated notification-model API for control-panel roles
  • a web PWA baseline (manifest.webmanifest + sw.js)
  • client-side service worker registration
  • an operator dashboard notification-readiness card with explicit opt-in behavior
  • integration/API coverage for role-gating and model contract
  • updated OpenAPI spec/output for UI consumers

Related Issue

Closes: #149

Change Type (select all)

  • Feature
  • API change
  • UI/UX update
  • PWA enhancement
  • Tests
  • Documentation/OpenAPI contract update
  • Bug fix
  • Breaking change
  • Security fix
  • Refactor only
  • CI/config only

Real Behavior Proof

API behavior

  • GET /v1/app/notification-model returns 200 for operator/admin auth with:
    • mode: "opt_in"
    • defaultState: "disabled"
    • browser_push.defaultEnabled: false
    • pwa.nativeDependency: false
  • Same endpoint returns 403 for unknown/no-role browser session.

Runtime behavior

  • Worker starts locally:
    • wrangler dev --local ...
    • observed: Ready on http://127.0.0.1:8792

Test/validation outputs

  • npm run typecheck
  • npm run test:integration -- test/integration/api.test.ts
  • npm run ui:openapi:check
  • npm run ui:typecheck
  • npm run ui:build
  • npm run test:unit ✅ (44 files, 540 tests passed)

Public/Private Boundary Notes

  • Notification model is private control-panel API (role-gated).
  • Public GitHub output boundaries remain unchanged.
  • Model explicitly documents forbidden sensitive language/categories for notification payload safety.

Checklist

  • Requirement analyzed against issue feat(pwa): make the control panel notification-ready #149
  • Notification model designed as opt-in
  • No native app dependency introduced
  • PWA baseline added (manifest + service worker)
  • Control panel updated for notification readiness UX
  • API-level tests added/updated
  • OpenAPI updated and regenerated
  • Typecheck passed
  • Integration tests passed
  • Unit tests passed
  • Local runtime verified without startup errors

@dosubot dosubot Bot added the size:L label Jun 1, 2026
@jonathanchang31

Copy link
Copy Markdown
Contributor Author

@JSONbored Could you plz review my PR?

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@jonathanchang31 This needs another pass. Merge conflicts, etc.

The current failures are Prettier/ESLint formatting issues in the notification readiness UI. Please run the UI formatting/lint gate, commit the formatted output, and rerun validation. Since this touches apps/gittensory-ui, the expected gate is npm run ui:openapi:check, npm run ui:lint, npm run ui:typecheck, and npm run ui:build.

Signed-off-by: Jonathan Chang <55106972+jonathanchang31@users.noreply.github.com>
@jonathanchang31

Copy link
Copy Markdown
Contributor Author

@JSONbored Could you plz review my PR? Thanks && I love gittensory.

@JSONbored
JSONbored dismissed their stale review June 1, 2026 20:42

@jonathanchang31 This is ready from my side. The prior UI formatting and /v1/app/notification-model failures are fixed, current checks are green, and the merge tree is clean.

A few notes:

  • The PWA baseline, service worker registration, manifest, notification readiness card, API route, OpenAPI spec, and integration coverage are all included.
  • The notification model is opt-in/readiness-oriented rather than claiming delivery that does not exist yet.
  • Since this touches apps/gittensory-ui, the UI/OpenAPI artifact freshness gate matters; the current branch passes validation.

No requested changes from me.

@JSONbored
JSONbored merged commit d79311e into JSONbored:main Jun 1, 2026
3 checks passed
@JSONbored JSONbored added gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. and removed feature gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(pwa): make the control panel notification-ready

2 participants