feat(nexus-operations): add capability flag, guard component, and configurable table columns#3466
Merged
rossedfort merged 1 commit intoMay 27, 2026
Conversation
…figurable table columns Adds Phase 2 (DT-4006) infrastructure for standalone nexus operations: - NamespaceCapabilities type with standaloneNexusOperations field in src/lib/types/index.ts - Guard component that checks both capability flag and minimum server version (1.31.0) - Disabled state component with Dynamic Config instructions - i18n namespace for standalone-nexus-operations - TABLE_TYPE.NEXUS_OPERATIONS, NexusOperationHeaderLabels, default/available column arrays, persistedNexusOperationsTableColumns store, configurableTableColumns derived store update, availableNexusOperationColumns export, and exhaustive switch cases in configurable-table-columns.ts
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Motivation
Phase 2 of Standalone Nexus Operations (DT-4006). Phase 1 (DT-4005) shipped the API integrations — types, services, stores, poller, route helpers, and filters. This phase ships the feature-gating infrastructure that Phase 3 (DT-4004) will consume when rendering the actual UI.
What changed
Capability type extension (
src/lib/types/index.ts)The
standaloneNexusOperationscapability flag does not yet exist in@temporalio/proto. The same pattern used forserverScaledDeploymentsis applied here — aNamespaceCapabilitiesintersection type that extends the protoICapabilitieswith the custom field:The guard component casts to this type when checking the flag, so the rest of the codebase remains unaffected until the proto ships.
Guard component (
standalone-nexus-operations-guard.svelte)Mirrors
standalone-activities-guard.svelte. Gates on both the namespace capability flag (standaloneNexusOperations) and server version ≥ 1.31.0. Renderschildrenwhen both conditions are true,fallback(if provided) otherwise.Disabled state component (
standalone-nexus-operations-disabled.svelte)Shown by the route page when the guard renders the fallback. Displays an info alert and Dynamic Config instructions (global and per-namespace) explaining how to enable the feature.
i18n strings (
src/lib/i18n/locales/en/standalone-nexus-operations.ts)New namespace with the 4 strings required by the disabled component. Registered in
src/lib/i18n/locales/en/index.tsalongsideStandaloneActivities.Configurable table columns (
src/lib/stores/configurable-table-columns.ts)All 8 atomic changes applied together (partial application causes
pnpm checkfailures becauseConfigurableTableTypeexpands and all switch statements become non-exhaustive):TABLE_TYPE.NEXUS_OPERATIONS = 'nexus-operations'added to the const mapNexusOperationHeaderLabelstuple andNexusOperationHeaderLabeltype exportedDEFAULT_NEXUS_OPERATIONS_COLUMNS(6 default columns) andDEFAULT_AVAILABLE_NEXUS_OPERATIONS_COLUMNS(4 optional columns) exported/definedpersistedNexusOperationsTableColumnspersist store addedconfigurableTableColumnsderived store extended with the new persist store and'nexus-operations'key ingetTableColumnsavailableNexusOperationColumnsexported derived store for the column picker UIgetDefaultColumnsandgetPersistedColumnsswitches extended withTABLE_TYPE.NEXUS_OPERATIONScasesTesting
pnpm check— zero new errorspnpm lint— zero new errors in changed filespnpm test -- --run— all 140 unit tests pass