Carry eks-manager, webkit and configboard to the current SDKs - #223
Merged
Merged
Conversation
The weekly bumps took the rest of the repo to sdk v0.4.10 (#221) and js-sdk 0.4.4 (#222) and left these three behind, because each needs a code change the bots will not make. This makes those changes and bumps the three, so no example is on an older SDK than its neighbours. cubapi.GetRevisionByNum is gone. It lived in the SDK's apply.go, which was deleted whole when the file-based apply went away; the helper was not apply-specific and went with it. eks-manager was its only caller, in the disruption check that joins a Unit's released revision against its head. The endpoint it wrapped is untouched, so internal/cub now resolves a revision number to its RevisionID itself, which also lets RevisionDocs parse the space and unit ids once instead of twice. login and logout now take an options bag -- returnTo and the organization hint, endSession and its redirect. That makes them (options?) => Promise<void>, no longer assignable to onClick, so the three buttons that were passing them straight to MUI call them instead. The defaults are what these apps already relied on: the current path to return to, the remembered organization, and a logout that forgets the token in this tab without ending the IdP session. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KGek5d9soyovnouhNXJRDF
cost-management-app and pilot-example-addons-manager pass login and logout to onClick the same way webkit and configboard did, so the same change applies: call them instead of handing the click event in as the options bag. The bots reported both as updated because neither defined a lint script. The verifier runs lint, build and test and skips any step a package does not define; these two define only test, whose assertions match the app source as text and cannot see a type error. Both now define lint, so the next bump typechecks them. Turning the check on found what it was always going to find: the tsconfig had no vite/client, so import.meta.env in main.tsx was untyped. Nothing had ever run tsc over these apps to say so. That is every consumer. Of the nine packages that depend on react-auth, five reach login and logout through webkit's AppShell, and cost-estimator takes only status. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KGek5d9soyovnouhNXJRDF
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.
The weekly bumps took the rest of the repo to sdk
v0.4.10(#221) and js-sdk0.4.4(#222), and left three examples on the old releases because each needed a code change first. This makes those changes, bumps the three, and carries the two consoles the bots wrongly reported as updated.eks-manager:
cubapi.GetRevisionByNumis goneIt lived in the SDK's
apply.go, which was deleted whole when the file-based apply went away. The helper was not apply-specific and went with it; eks-manager was its only caller in this repo, in theplan/replacedisruption check that joins a Unit's released revision against its head.The endpoint it wrapped is untouched, so
internal/cubresolves a revision number to itsRevisionIDitself.RevisionDocsnow parses the space and unit ids once instead of twice.Every console:
loginandlogouttake optionslogingainedreturnToand an organization hint;logoutgainedendSessionand its redirect, and its return type went fromvoidtoPromise<void>. Neither is assignable toonClickany more. Eight buttons across four packages were passing them straight through; they call them instead.Nothing about these apps' behaviour changes: the defaults are exactly what they already relied on — the current path to return to, the remembered organization, and a logout that forgets the token in this tab without ending the IdP session.
That is every consumer. Of the nine packages depending on
@confighub/react-auth, four reachlogin/logoutdirectly (webkit, configboard, cost-management-app, pilot-example-addons-manager), five go through webkit'sAppShell, and cost-estimator takes onlystatus. The rest of the API surface is compatible:getTokenandclientsurvive, andConfigHubAuthProviderPropsonly gained optional fields.Why the bots missed two of them
update-js-sdk.shrunslint,buildandtest, skipping any step a package does not define.cost-management-appandpilot-example-addons-managerdefine onlytest, and those tests match the app source as text — they cannot see a type error. Both now definelint, so the next bump typechecks them.Turning the check on found what it was always going to find: their tsconfig had no
vite/client, leavingimport.meta.envuntyped inmain.tsx. Nothing had ever runtscover these apps to say so.These two are still outside the
js-apps.ymlmatrix, which keys on a per-apppackage-lock.jsonthat neither has. Bringing them in is a larger change than a dependency bump and is not attempted here.Verified
eks-manager:go build ./...,go vet ./...,go test ./...all pass.webkit:npm run lintclean, 29 tests pass.configboard/app:npm run lintclean,npm run buildsucceeds, 166 tests pass.cost-management-app,pilot-example-addons-manager:npm run lintclean,npm run ui:buildsucceeds, fullnpm testsuites pass.🤖 Generated with Claude Code
https://claude.ai/code/session_01KGek5d9soyovnouhNXJRDF