Files
windmill/frontend/src/lib/components
hugocasaandDevdatta Talele 2f0e00f9cf feat(frontend): add wildcard pattern support to MCP token custom scope (#7306)
* feat(mcp): add wildcard pattern support to token UI custom scope

- Add text input fields for wildcard patterns in Custom scope
- Combine wildcard patterns with individual script/flow selections
- Support comma-separated patterns (e.g., f/outline/*,f/docs/*)
- Add help popover explaining pattern syntax with examples
- Backward compatible: empty patterns preserve existing behavior

Closes #7252

* fix(mcp): apply critical code review fixes for wildcard patterns

Apply fixes identified by code-smells agent:

**P0 - Code Duplication (CRITICAL)**
- Extract pattern parsing logic into reusable helper function
- Eliminates duplicate code between scripts and flows processing
- Improves maintainability and consistency

**P1 - Button Validation (CRITICAL)**
- Fix button disable condition to allow pattern-only tokens
- Users can now create tokens with ONLY wildcard patterns
- Resolves Test Scenario #6 from design document

**P2 - State Management (MODERATE)**
- Add $effect to clear patterns when switching scopes
- Prevents stale data from persisting across mode changes
- Improves user experience and data consistency

Changes:
- Added parsePatterns() helper function
- Updated button disable condition with pattern checks
- Added two $effect hooks for state cleanup
- Reduced code duplication by 10 lines

Testing: All edge cases now properly handled including pattern-only tokens

* nits

* nit

---------

Co-authored-by: Devdatta Talele <devtalele0@gmail.com>
2025-12-05 18:14:03 +00:00
..
2025-12-03 13:34:44 +00:00
2025-11-30 11:46:55 +00:00
2025-09-11 07:57:01 +00:00
2025-11-29 16:03:58 +00:00
2025-12-03 14:55:32 +00:00
2025-11-29 01:23:47 +00:00
2025-10-30 06:47:26 +00:00
2025-12-03 14:55:32 +00:00
2025-10-28 17:52:04 +00:00
2025-11-07 18:51:33 +00:00
2025-10-23 20:18:08 +00:00
2025-11-29 01:23:47 +00:00
2025-11-29 01:23:47 +00:00
2025-10-27 15:48:59 +00:00
2025-11-04 19:13:09 +00:00
2025-11-12 13:39:32 +00:00
2025-06-28 20:13:55 +02:00
2025-10-27 23:42:52 +00:00
2025-11-29 01:23:47 +00:00
2025-08-10 23:24:36 +00:00
2025-07-19 06:59:49 +00:00
2025-09-27 08:04:17 +00:00
2025-09-11 06:58:39 +00:00
2025-11-06 13:04:00 +00:00
2025-11-27 06:41:20 +00:00
2025-11-04 19:13:09 +00:00
2025-06-30 00:07:35 +00:00
2025-11-29 01:23:47 +00:00
2025-11-29 01:23:47 +00:00
2025-07-17 22:15:01 +00:00
2025-07-29 19:28:54 +00:00
2025-07-08 06:47:08 +00:00
2025-07-29 19:28:54 +00:00
2025-10-16 14:41:12 +00:00
2025-06-28 20:13:55 +02:00
2025-11-07 18:51:33 +00:00
2025-10-27 15:46:28 +00:00
2025-09-09 21:04:23 +00:00
2025-11-20 14:37:34 +00:00