Repository navigation
Super Admin switch for shop app early access - #332
Merged
Merged
Conversation
Adds a Shop app early access card to Operational settings: open/closed state, a confirmation that says the website shop form opens or closes, an audited reason, the expectedVersion handshake and a reload on a stale version. Mounted only on the Super Admin settings screen. Refs #329
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #329
What
A Shop app early access card on Super Admin's Operational settings (
/admin/settings) that turnsshopEarlyAccessEnabledon or off (contract: "Activation and mixed-version rollout" ingridgo-api/docs/EARLY_ACCESS_API.md, API gridgoph/gridgo-api#418).expectedVersionand the reason (Shop app early access opened. <reason>). A409 settings_version_conflictcloses the dialog, says someone else saved, and reloads the settings in force. An API without the field shows "not available yet" and no switch.OperationalSettings, which only/admin/settingsmounts (/ops/settingsstays the "Super Admin only" screen). A test checks both import paths.Tests run
npm run typecheck: clean.npm run lint: 0 errors (2 existing warnings in other files).npm test: 401/403 files passed on the first run. The 2 failures were 5 s timeouts under host load in unrelated files (admin/broadcast,tracker/DecisionPanel). Both pass on a rerun (15/15).src/components/settings/__tests__/shop-early-access-settings.test.tsx(6 tests): closed state and copy, a flip writes nothing and Cancel keeps it closed, a reason is required, opening sends version + reason, closing has its own confirmation, the 409 path reloads, an older API, and the Super Admin-only mount.Browser check
The shared dev API does not serve
shopEarlyAccessEnabledyet, so I tested against a copy of gridgo-apidevon a spare port, backed by a throwaway seeded Postgres. Shared servers and the shared database were not touched. Withnext devand the dev Super Admin, at 1280×900 and 390×844:PATCH /settingswrites (the audit log kept both reasons), and the empty-reason refusal. The flag was left off./ops/settingsshows no card at either size.Rollout
Turn it on only after the new API is deployed and no old API process remains. Before any rollback to code from before the app choice, the switch must be off and there must be no shop rows (rollback preflight in the API doc).