refactor(web): migrate app context consumers#38530
Merged
Merged
Conversation
6 tasks
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #38530 +/- ##
=======================================
Coverage 85.34% 85.34%
=======================================
Files 5012 5013 +1
Lines 265775 265829 +54
Branches 50519 50534 +15
=======================================
+ Hits 226813 226863 +50
- Misses 34512 34516 +4
Partials 4450 4450
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
lyzno1
approved these changes
Jul 8, 2026
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.
Important
Fixes #<issue number>.Summary
Migrate Apps / app detail AppContext consumers to exact bootstrap atom reads as the next domain migration after Datasets.
This PR replaces broad
useAppContext()/useSelector()reads across app detail, app creation/import, app configuration, access control, and apps list/card surfaces with direct reads fromapp-context-stateatoms such asuserProfileIdAtom,workspacePermissionKeysAtom,currentWorkspaceAtom, andlangGeniusVersionInfoAtom.It also adds a shared atom mock helper for focused frontend tests and updates affected specs to mock the exact bootstrap atoms consumed by migrated components.
Refs #38514
From Codex
Screenshots
Checklist
make lint && make type-check(backend) andcd web && pnpm exec vp staged(frontend) to appease the lint godsValidation:
pnpm -C web test app/components/app/access-config/__tests__/index.spec.tsx 'app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/__tests__/view.spec.tsx' 'app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/__tests__/chart-view.spec.tsx' 'app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/__tests__/panel.spec.tsx' 'app/(commonLayout)/app/(appDetailLayout)/[appId]/__tests__/layout-main.spec.tsx' app/components/app/create-from-dsl-modal/__tests__/index.spec.tsx app/components/app/overview/embedded/__tests__/index.spec.tsx app/components/app/log/__tests__/list.spec.tsx app/components/app/overview/__tests__/trigger-card.spec.tsx app/components/app/create-app-modal/__tests__/index.spec.tsx app/components/app/create-app-dialog/app-list/__tests__/index.spec.tsx app/components/app/app-access-control/__tests__/add-member-or-group-pop.spec.tsx app/components/app/configuration/debug/debug-with-single-model/__tests__/index.spec.tsx app/components/app/configuration/debug/debug-with-multiple-model/__tests__/chat-item.spec.tsx app/components/app/configuration/hooks/__tests__/use-configuration.spec.tsx app/components/app/configuration/dataset-config/__tests__/index.spec.tsx app/components/app/configuration/dataset-config/select-dataset/__tests__/index.spec.tsx app/components/apps/__tests__/app-card.spec.tsx app/components/apps/__tests__/list.spec.tsx app/components/apps/__tests__/index.spec.tsx app/components/apps/__tests__/creators-filter.spec.tsx --rungit diff --check HEAD~1..HEADpnpm --dir web exec eslint __tests__/utils/mock-app-context-state.ts --fix --cache --quietNotes:
pnpm --dir web exec vp stagedis currently blocked because this checkout'svite.config.tsdoes not define astagedconfig.pnpm -C web type-checkis currently blocked by existing generated.next/types/validator.tsroute/layout type errors unrelated to this PR's touched files.Inputimports, existinganyusage, and existing a11y issues. This PR intentionally avoids expanding the migration into unrelated cleanup.