drop the two apps API wrappers the socket-driven update flow orphaned - #5850
Merged
Conversation
Moving RepositorySourcePanel onto the socket-backed useAppOperation hook (2e996e4) left `pullAndUpdateApp` and `getPreferredSelfRestartOrigin` with no production caller, so client/src/services/api.deadExports.test.js fails on any full-mode run — main's CI stays green only because the run planner scopes tests to changed files. Neither symbol is referenced inside apiApps.js (handleSelfRestart does not call either), so both are deleted rather than un-exported, along with the now-unused apiSystem.js import and its test mock. The server's POST /api/apps/:id/update route is untouched; the live update path is the app:update socket event. Fixes #5848
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.
Summary
client/src/services/api.deadExports.test.jsfails on any full-mode client run withcaller-less wrappers: apiApps.js:getPreferredSelfRestartOrigin, apiApps.js:pullAndUpdateApp.main's CI is green only because the run planner scopes tests to changed files, so this blocks unrelated PRs (e.g. fix: publish the endpoint guard through aiToolkit's public barrel #5625, a server-only change).2e996e4d2movedRepositorySourcePanel.jsxonto the socket-drivenuseAppOperationhook. Its only remainingapi.*calls aregetAppRepositorySourcesandsyncAppRepositoryFork.apiApps.js—handleSelfRestartdoes not callgetPreferredSelfRestartOrigin, so there is no intra-module use to preserve.import { getNetworkExposure } from './apiSystem.js'and itsvi.mock/vi.hoistedscaffolding inapiApps.test.js. No cascade:getNetworkExposurestill has live callers inNetworkExposureWidget.jsxandInstances.jsx.getPreferredSelfRestartOrigindescribe block, the two deadvi.fn()mocks inRepositorySourcePanel.test.jsx, and retargeted the vacuousexpect(api.pullAndUpdateApp).not.toHaveBeenCalled()at the live surface (useAppOperation(...).startUpdate) so the "Sync fork must not kick off an update" regression is still covered.api.jsre-exportsapiApps.jswithexport *, and the services README catalogs modules, not individual exports.POST /api/apps/:id/updateconsumer findingserver/routes/apps/lifecycle.js:240) is left untouched — removing it is out of scope.app:updateevent (server/sockets/apps.js:91), whichuseAppOperation.js:162emits; both handlers call the sameappUpdater.updateApp.server/routes/apps/lifecycle.test.js:401), the generated route catalog, and a historical changelog entry. No sockets, palette/voice manifest entries, or scripts reach it.Test plan
client && npx vitest run src/services/api.deadExports.test.js src/services/apiApps.test.js src/components/apps/tabs/RepositorySourcePanel.test.jsx— 3 files, 13 tests passed.client && npm run test:ci— 861 passed | 1 skipped (862 files), 10756 passed | 2 skipped (10758 tests), 142s. Zero failures; the dead-export guard is green in full mode, which is the point of the fix.client && npm run build— clean.Fixes #5848