← Back to PRs

#22809: fix(ui): preserve parent map rendering by carrying forward granular...

by lupuletic open 2026-02-21 18:01 View on GitHub →
app: web-ui size: S
The config form analyzer marks parent `accounts` map nodes as unsupported when only nested child schema paths are unsupported. Closes #1749 Changes: - Update `analyzeConfigSchema` to propagate unsupported child paths from `additionalProperties`/array item analysis instead of collapsing to the parent path. - Add wildcard-aware unsupported-path matching in `renderNode` so entries like `accounts.<id>...` correctly match analyzer paths like `accounts.*...`. - Add regression tests using Telegram schema JSON output to assert `accounts` is no longer blocked while unsupported nested fields are still flagged. Testing: - pnpm build && pnpm check && pnpm test - Run `pnpm test` for `ui/src/ui/config-form.browser.test.ts` with new regression coverage for Telegram `accounts`, then manually verify the web UI channel config form renders Accounts without the top-level unsupported-node error. --- AI-assisted (Claude + Codex committee consensus, fully tested). <!-- greptile_comment --> <h3>Greptile Summary</h3> Fixed a bug where parent map/array nodes were incorrectly marked as unsupported when only nested child schema paths had unsupported types. The analyzer now properly propagates granular unsupported paths (like `accounts.*.unsupportedUnion`) instead of collapsing to parent paths (like `accounts`), allowing parent containers to render while blocking only the problematic nested fields. Key changes: - `analyzeConfigSchema` now carries forward all nested unsupported paths from `additionalProperties`/array item analysis instead of marking the parent as unsupported - `pathKey` helper converts numeric array indices to wildcards (`*`) for consistent path matching - `isUnsupportedPath` matcher handles wildcard segments so concrete paths like `accounts.mybot.field` correctly match patterns like `accounts.*.field` - Added comprehensive regression tests for both map and array scenarios with Telegram-like schemas <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk - The changes are well-isolated to config form analysis and rendering logic, with comprehensive test coverage including both unit tests and rendering tests. The fix properly addresses the issue of parent containers being incorrectly blocked, and the wildcard path matching logic is straightforward and correct. No security concerns, performance issues, or breaking changes identified. - No files require special attention <sub>Last reviewed commit: f58f426</sub> <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs