Finish the app-config audit: bundled defaults and dev-config config blocks across converted apps
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 18/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- react, typescript
- Lĩnh vực
- developer-experience, frontend
Hướng nghiên cứu
Start with the defaultConfig and site.config.dev.tsx files in each converted app repo, plus the getAppConfig and parseEnvBoolean reads named in the plan, such as src/widgets/LearnerDashboardHeader/app.tsx in learner-dashboard. Work per repo, leaving the instructor-dashboard and profile steps until openedx/frontend-base#337 is resolved. Done means each app's dev config has no config block, the no-op defaults are removed, and their reads have fallbacks, with one PR per repo linked back to this tracker.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
[!NOTE]
This issue was written by Claude (Claude Code) and reviewed before posting.
Goal: finish the app-config audit that #299 (now closed) started, so that every converted app bundles only genuine defaults in defaultConfig, falls back at the read site for everything else, and carries no app config block in its site.config.dev.tsx.
Why: ADR 0017 and #268 split App.config (the operator's) from App.defaultConfig (the author's), and #299 asked each app to "sort its bundled keys into genuine defaults, which move, and no-ops or placeholders, which go away". openedx/frontend-app-catalog#156 and openedx/frontend-app-learner-dashboard#868 did that sort strictly: a key is a default only when it changes behaviour against an unset read, so null, '' and false placeholders and "no-ops against already-guarded reads" were dropped and the reads given a fallback. authn did the same sort the same day (d124a0a, "feat!: bundle only real defaults in app config") and kept only the three keys the rule keeps; account and profile were converted a month later, in their "adopt frontend-base tooling" commits, with a looser reading. Enumerated 2026-10-31 over every openedx repo with a site.config.dev.tsx:
| App | defaultConfig |
site.config.dev.tsx app config block |
Reads config |
|---|---|---|---|
| account | 9 keys: SUPPORT_URL: null, PASSWORD_RESET_SUPPORT_LINK: null, SHOW_PUSH_CHANNEL: false, ENABLE_COPPA_COMPLIANCE: false, ENABLE_DOB_UPDATE: false, MARKETING_EMAILS_OPT_IN: false, COUNTRIES_WITH_DELETE_ACCOUNT_DISABLED: [], ENABLE_ACCOUNT_DELETION: true, SUPPORT_URL_TO_UNLINK_SOCIAL_MEDIA_ACCOUNT: <help.edx.org URL> |
SUPPORT_URL, PASSWORD_RESET_SUPPORT_LINK, SHOW_PUSH_CHANNEL |
yes |
| authn | DISABLE_ENTERPRISE_LOGIN: true, LOGO_URL, LOGO_WHITE_URL (edx-cdn) |
INFO_EMAIL, MARKETING_SITE_BASE_URL, SESSION_COOKIE_DOMAIN |
yes, ~20 keys |
| profile | DISABLE_VISIBILITY_EDITING: false, CREDENTIALS_BASE_URL: null |
CREDENTIALS_BASE_URL: 'http://local.openedx.io:18150' |
yes |
| catalog | HOMEPAGE_COURSE_MAX |
ENABLE_COURSE_DISCOVERY, ENABLE_COURSE_SORTING_BY_START_DATE, INFO_EMAIL |
yes |
| instructor-dashboard | none | SUPPORT_URL |
only the shell help button via helpButtonSlotOperation, which reads SUPPORT_URL at render |
| learner-dashboard | none (#868) | none | yes |
| admin-console, aspects, gradebook, notifications | none | none | no |
| frontend-template-application | none | none | no |
| frontend-template-site | n/a | commonAppConfig: { SUPPORT_URL } and a config block on the instructor dashboard |
n/a |
Three things follow. First, the null/false entries in account and profile are the placeholders #156 and #868 removed elsewhere; by the same rule they go, and their reads get the fallback. Second, the dev-config config blocks are operator configuration typed into a developer file: they shadow what the operator's site config would supply, and four of the five carry at least one value tutor already serves in commonAppConfig (INFO_EMAIL, MARKETING_SITE_BASE_URL, ENABLE_COURSE_DISCOVERY, ENABLE_COURSE_SORTING_BY_START_DATE, CREDENTIALS_BASE_URL, PASSWORD_RESET_SUPPORT_LINK are all in the dev tutor response, though tutor's CREDENTIALS_BASE_URL is '', which hides the records button the dev block's laptop URL shows). For instructor-dashboard, which bundles no defaultConfig, the block is also the only thing keeping its help button off the getAppConfig undefined return that learner-dashboard master now hits in npm run dev (#337); the four apps with a defaultConfig take the merge path with or without their block. Third, the dev-config values tutor does not serve are account's SUPPORT_URL and SHOW_PUSH_CHANNEL, instructor-dashboard's SUPPORT_URL and authn's SESSION_COOKIE_DOMAIN. The last is read only by two setCookie calls (RegistrationPage.jsx, RedirectLogistration.jsx), which set a host-only cookie when it is unset, so a one-host dev run does not notice; it is an operator value, not a default.
Claude Plan
Written 2026-10-31 against frontend-base ae5ec93; app heads: account 662bbf7, authn 0f9f2a9, profile b6ebe9b, catalog 586f5f6, instructor-dashboard 25c6f02, learner-dashboard 162fad7.
The rule, as #156 and #868 applied it
- A bundled key stays, in
defaultConfig, only when its value differs from what the read site does withundefined. A boolean default offalsebehind a truthiness or=== trueread, anullor''URL behind a read that renders nothing without it, and an empty array behind anincludesare all no-ops and go. Atruedefault, a number, or a real URL the product owns (ADR 0017's "default logo") stays. - A read of a removed key gets its fallback at the read site: the catalog pattern is
getLearningHomePageUrlreturningnulland the button gated on it; the learner-dashboard pattern is the credit checkout link returningnull. - An app repo's
site.config.dev.tsxcarries site identity and URLs only: no appconfigblock, nocommonAppConfig. A value a dev run needs that an operator would set comes from the LMS (runtimeConfigJsonUrl: '/api/frontend_site_config/v1/', which frontend-base's ownshell/site.config.dev.tsxandtest-site/site.config.dev.tsxuse, and which the dev server already proxies) or is a real default and belongs indefaultConfig. The LMS route has one catch to settle before any app takes it: the runtime merge applies the whole response, so the LMS'sbaseUrl(http://apps.local.openedx.io:8080) replaces the app's own dev port. - Every step that leaves an app with no
defaultConfigand no dev block (learner-dashboard now, profile after 4, instructor-dashboard after 6) waits for #337: the shell help button readsgetAppConfig(appId).SUPPORT_URLat render inside frontend-base, and no app-side guard reaches it.
Per app
- learner-dashboard: nothing to bundle and no dev block to drop. The five app reads, in
src/widgets/LearnerDashboardHeader/app.tsx(ENABLE_PROGRAMS,ORDER_HISTORY_URL),OrderHistoryLinkMenuItem.jsx,src/data/services/lms/urls.jsand theuseAppConfigread inUnenrollConfirmModal, are value-guarded only, and the sixth, the help button mounted in the sameapp.tsx, is frontend-base's own, so nothing here can make the dev run survive anundefinedconfig. This app waits for #337 and then takes only the frontend-base bump. - account: audit the nine; by the rule
ENABLE_ACCOUNT_DELETION: trueandSUPPORT_URL_TO_UNLINK_SOCIAL_MEDIA_ACCOUNTstay, the rest go. The four booleans and the array already pass throughparseEnvBooleanandparseEnvArray, which takeundefined. The twonullURLs are not gated:ReviewRequirementsPanel.jsx,SummaryPanel.jsx,AccountSettingsPage.jsxandConfirmationAlert.jsxrender aHyperlinkwith the raw value, so they get the catalog gate (no link when unset instead of a dead one), which is the user-facing change that makes this PR afeat!:. Drop the dev block. - authn: the three defaults stay (a
trueand two product logos). Drop the dev block: tutor servesINFO_EMAILandMARKETING_SITE_BASE_URL, andSESSION_COOKIE_DOMAINunset means host-only cookies from the twosetCookiecalls. The one thing to check by hand is the registration flow with that key unset. - profile (after #337, since this leaves it with no
defaultConfig):DISABLE_VISIBILITY_EDITING: falseandCREDENTIALS_BASE_URL: nullgo, and the comments that document them as deliberate nulls go with them;useIsVisibilityEnabledalready runsparseEnvBooleanand theProfilePageread already gates the button. Drop the dev block (a laptop URL, theLEARNING_BASE_URLcase from #868; tutor's''hides the button, which is the production case). - catalog:
defaultConfigis already right. Drop the dev block (all three keys served by tutor). - instructor-dashboard (after #337, since the help button's read throws at render with nothing registered): drop the dev block; the help button then needs
SUPPORT_URLfrom the operator, which is the production case anyway. - frontend-template-application: show
defaultConfigon the app (per #268's checklist, "its example should demonstratedefaultConfig"); its dev config has no block to drop. frontend-template-site is a site, so the dev-config rule does not apply: itscommonAppConfigand the instructor-dashboardconfigblock are the operator's two fields by ADR 0017's split and stay as the example. The...instructorDashboardApp.configspread inside that block is the fragile pattern #268 described and spreadsundefined, since that app bundles noconfig; it goes.
One PR per repo, each a fix: (removing dev-only values and no-op defaults changes no deployed behaviour) except account, whose new gates change what renders, as #156 and #868 were feat!: for the view-course and credit buttons. This issue is the tracker; the per-repo PRs link back to it.
- Ngôn ngữ chính
- TypeScript
- Star
- 4
- Fork
- 13
- Merge trung bình
- 3 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của openedx/frontend-base
-
Export `SkipLink` componentĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
openedx/frontend-base#330 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
openedx/frontend-base#327 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
openedx/frontend-base#210 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
openedx/frontend-base#350 ·
-
External routes ignore paramsCó thể đã có người làm @arbrandes đã nhận hôm nay. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
openedx/frontend-base#349 · 1 người được giao ·
Tất cả issue của openedx/frontend-base
Issue tương tự
-
bug P3
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 87/100
Maintainer thường phản hồi trong vòng 1 ngày
-
feat(ai): add markdown checklist export and copy-to-clipboard button to ActionItemSynthesizer drawerĐang mởai enhancement feature feature-request good-issue L1 level 1 needs-review wocs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
SatyamPandey-07/WorkSphere#8149 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement follow-up
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Client execution contract accepts a grant the code never takesCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởarea: client enhancement priority: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
opensro-dev/opensro#3808 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug ux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
mithilp/keybuddies#66 ·