feat(config): #770 curated env section projection + control metadata - #1344
feat(config): #770 curated env section projection + control metadata#1344mindfn wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c34f4b1139
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| * Module summaries are derived from the canonical `buildEnvSummary()` so that | ||
| * masking and visibility policy stay in one place. | ||
| */ | ||
| export function buildSectionEnvSummary(section: string): Array<EnvDefinition & { currentValue: string | null }> { |
There was a problem hiding this comment.
Wire the section projection into the product path
In the inspected target tree, repo-wide search finds buildSectionEnvSummary and the new projection exports referenced only by tests. routes/config.ts:272-284 still recognizes only surface=system and otherwise returns the full buildEnvSummary(), while SettingsContent.tsx:208-214 still mounts HubEnvFilesTab, which fetches the unscoped endpoint. Consequently none of the new module projections can be requested or displayed, and the System page continues showing the full registry despite this commit claiming to complete the curated, fail-closed migration; wire these projections through the endpoint and their corresponding settings sections.
Useful? React with 👍 / 👎.
|
Maintainer direction: WELCOME into exact-HEAD formal review, but this is not merge approval. The direction is anchored by accepted clowder-ai#770, with clowder-ai#1280 and clowder-ai#1340 already merged as its preceding slices. At current HEAD Three items need to be resolved in the review round:
The public test check is still running. External author [小太阳·砚砚/GPT-5.6 Sol🐾] |
c34f4b1 to
a4aeed4
Compare
|
Thanks for the formal review direction. All three items addressed in the updated HEAD
Re: the inline Codex comment on Verification re-run after changes:
|
a4aeed4 to
3b83cdc
Compare
|
@chatgpt-codex-connector 返修已 push(HEAD 本轮变更:
验证(在 PR 分支 worktree 运行):
请基于新 HEAD 做 delta review。 |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
… curated env UI Why: - The System Settings tab currently shows the full env registry via HubEnvFilesTab. We need a fail-closed section projection so module-level configuration can migrate to module pages while the System tab shows only curated system vars. - Directory-type vars and LOG_LEVEL need explicit UI control hints so the frontend can render directory pickers and dropdowns instead of plain text. What: - Add packages/api/src/config/env-sections.ts with MODULE_SECTION_PROJECTION for im/voice/notify/mcp/ops/accounts/members/concierge plus section labels. - Extend EnvDefinition with control?: 'text'|'toggle'|'dropdown'|'dirpicker' and inferEnvControl() with precedence: explicit > booleanSemantics > allowedValues > default text. - Mark 15 directory-type vars with control: 'dirpicker' and add allowedValues to LOG_LEVEL. - Build SECTION_PROJECTION as system (SYSTEM_VARS) + module sections. - Add 12 tests covering projection fail-closed behavior, control inference, LOG_LEVEL dropdown, and dirpicker marking.
3b83cdc to
99dc049
Compare
|
@chatgpt-codex-connector 返修已 push(HEAD 本轮闭环 sol 的两个 finding:
新增回归测试:
验证:
请基于新 HEAD 做 delta review。 |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Implements the contract-only slice of clowder-ai#770: the canonical module-level env section projection and control metadata for curated System / module settings.
ffa2af696).MODULE_SECTION_PROJECTIONto 42 non-system vars across 7 sections, removes emptymcp/conciergebuckets, and adds the newpluginssection.ENV_SECTION_KEYS/ENV_SECTION_LABELSand updates env-registry tests.docs/plans/770-env-config-inventory.md(locked digest8b263ab09f33546a2a7be74f1ea15992ee57ac537064bcf4c5658efca429916d) so the 42-variable section ownership contract can be independently checked.Scope boundary
This PR is intentionally contract-only, consistent with the staged #770 plan:
surface=system, nor does it implement module UI cards/settings sections.API/query consumers and module UI wiring are planned as follow-up slices under #770 and will reference this contract as the source of truth.
Follow-up tracking
buildSectionEnvSummary(section)into the config endpoint and mount per-module settings sections; this PR provides the allowlist/metadata they must consume.Verification
pnpm --filter @cat-cafe/api build✅pnpm --filter @cat-cafe/api lint✅pnpm check✅Closes #770.