hugocasa and Devdatta 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-05 07:52:14 +00:00
2025-12-03 13:34:44 +00:00
2025-11-13 09:51:15 +00:00
2025-06-29 08:18:46 +00:00
2025-11-24 17:39:35 +00:00
2025-12-05 07:05:55 +00:00
2025-11-30 11:46:55 +00:00
2025-12-04 22:09:25 +00:00
2025-09-11 07:57:01 +00:00
2025-12-05 18:01:27 +00:00
2025-11-30 17:42:16 +00:00
2025-12-05 18:02:41 +00:00
2025-11-24 08:37:55 +00:00
2025-11-24 19:43:14 +00:00
2025-10-22 15:56:36 +00:00
2025-12-04 22:09:25 +00:00
2025-10-22 15:56:36 +00:00
2025-10-01 16:04:15 +00:00
2025-11-12 10:20:39 +00:00
2025-11-29 16:03:58 +00:00
2025-12-04 22:09:25 +00:00
2025-12-03 14:55:32 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-11-24 08:37:55 +00:00
2025-12-04 22:09:25 +00:00
2025-12-05 18:14:03 +00:00
2025-12-04 22:09:25 +00:00
2025-10-29 21:02:36 +00:00
2025-10-22 15:56:36 +00:00
2025-12-04 22:09:25 +00:00
2025-12-04 22:09:25 +00:00
2025-11-29 01:23:47 +00:00
2025-11-21 13:01:33 +00:00
2025-12-01 11:18:37 +00:00
2025-10-31 07:41:39 +00:00
2025-10-21 15:28:52 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-12-05 07:45:05 +00:00
2025-11-14 10:14:32 +00:00
2025-07-11 18:19:47 +00:00
2025-10-30 06:47:26 +00:00
2025-10-22 15:56:36 +00:00
2025-12-03 14:55:32 +00:00
2025-06-29 22:46:27 +00:00
2025-11-10 09:51:30 +00:00
2025-10-28 17:52:04 +00:00
2025-12-04 22:09:25 +00:00
2025-10-22 15:56:36 +00:00
2025-10-30 15:28:04 +00:00
2025-11-05 17:53:46 +00:00
2025-11-04 20:54:24 +00:00
2025-12-04 22:09:25 +00:00
2025-12-04 22:09:25 +00:00
2025-10-22 15:56:36 +00:00
2025-04-05 12:17:26 +00:00
2025-10-22 15:56:36 +00:00
2025-12-04 22:09:25 +00:00
2025-06-27 15:26:03 +00:00
2025-10-22 15:56:36 +00:00
2025-11-07 18:51:33 +00:00
2025-10-22 15:56:36 +00:00
2025-12-04 22:09:25 +00:00
2025-09-01 09:49:15 +00:00
2025-11-11 19:08:10 +00:00
2025-10-28 11:36:05 +00:00
2025-10-28 11:36:05 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-10-27 15:49:27 +00:00
2025-10-23 20:18:08 +00:00
2025-09-11 16:12:36 +00:00
2025-10-22 15:56:36 +00:00
2025-07-11 09:56:53 +00:00
2025-05-08 16:30:27 +02:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-11-21 13:01:33 +00:00
2025-11-21 13:01:33 +00:00
2025-06-12 15:44:35 +02:00
2025-08-06 13:55:36 +00:00
2025-11-21 13:01:33 +00:00
2025-11-21 13:01:33 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-12-04 22:09:25 +00:00
2025-12-01 11:18:37 +00:00
2025-10-29 21:03:12 +00:00
2025-10-22 15:56:36 +00:00
2025-11-29 01:23:47 +00:00
2025-06-12 15:44:35 +02:00
2025-10-22 15:56:36 +00:00
2025-11-20 11:33:10 +00:00
2025-07-07 10:27:09 +00:00
2025-11-01 15:17:56 +01:00
2025-11-29 01:23:47 +00:00
2025-10-27 21:19:20 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-09-01 09:49:15 +00:00
2025-10-29 21:03:12 +00:00
2025-12-04 22:09:25 +00:00
2025-11-21 13:01:33 +00:00
2025-10-09 16:26:42 +00:00
2025-10-22 15:56:36 +00:00
2025-11-10 09:51:30 +00:00
2025-11-21 13:01:33 +00:00
2025-12-02 12:53:35 +00:00
2025-10-22 15:56:36 +00:00
2025-12-04 22:09:25 +00:00
2025-11-07 18:51:33 +00:00
2025-09-11 16:12:36 +00:00
2025-11-21 13:01:33 +00:00
2025-10-28 22:00:57 +00:00
2025-10-22 15:56:36 +00:00
2025-09-29 07:34:38 +00:00
2025-08-19 02:12:57 +00:00
2025-11-20 11:33:10 +00:00
2025-10-22 15:56:36 +00:00
2025-11-01 15:17:56 +01:00
2025-11-19 21:25:57 +00:00
2025-12-05 18:02:41 +00:00
2025-10-27 15:48:59 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-09-19 17:32:09 +00:00
2025-11-04 19:13:09 +00:00
2025-10-22 15:56:36 +00:00
2025-11-12 13:39:32 +00:00
2025-11-19 21:25:57 +00:00
2025-12-03 10:06:49 +00:00
2025-10-03 14:53:10 +00:00
2025-12-05 18:02:41 +00:00
2025-10-30 15:27:49 +00:00
2025-09-19 17:32:09 +00:00
2025-10-22 15:56:36 +00:00
2025-06-28 20:13:55 +02:00
2025-10-22 15:56:36 +00:00
2025-12-04 22:09:25 +00:00
2025-08-22 11:54:26 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-10-27 23:42:52 +00:00
2025-11-19 21:25:57 +00:00
2025-10-22 15:56:36 +00:00
2025-10-29 21:03:12 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-10-17 13:58:00 +00:00
2025-05-19 16:51:29 +02:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-11-28 16:00:11 +00:00
2025-10-22 15:56:36 +00:00
2025-10-30 14:46:10 +00:00
2025-10-22 15:56:36 +00:00
2025-12-04 22:09:25 +00:00
2025-11-29 01:23:47 +00:00
2025-10-22 15:56:36 +00:00
2025-08-10 23:24:36 +00:00
2025-06-12 15:44:35 +02:00
2025-11-12 10:20:39 +00:00
2025-11-07 15:27:00 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-12-04 22:09:25 +00:00
2025-11-07 16:22:13 +00:00
2025-10-24 19:39:11 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-10-21 18:40:28 +00:00
2025-07-19 06:59:49 +00:00
2025-09-27 08:04:17 +00:00
2025-10-28 22:00:57 +00:00
2025-09-27 21:52:13 +00:00
2025-10-30 15:28:04 +00:00
2025-10-30 15:28:04 +00:00
2025-12-04 22:09:25 +00:00
2025-10-22 15:56:36 +00:00
2025-11-14 10:14:32 +00:00
2025-09-11 06:58:39 +00:00
2025-11-06 13:04:00 +00:00
2025-10-22 15:56:36 +00:00
2025-12-04 22:09:25 +00:00
2025-11-27 06:41:20 +00:00
2025-10-21 15:28:52 +00:00
2025-07-30 21:36:32 +00:00
2025-10-22 15:56:36 +00:00
2025-11-04 19:13:09 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-08-19 02:12:57 +00:00
2025-10-17 13:36:05 +00:00
2025-09-11 16:12:36 +00:00
2025-06-12 15:44:35 +02:00
2025-10-30 15:28:04 +00:00
2025-06-27 15:26:03 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-10-30 15:28:04 +00:00
2025-08-01 11:54:56 +00:00
2025-10-22 15:56:36 +00:00
2025-12-04 22:09:25 +00:00
2025-10-30 15:28:04 +00:00
2025-10-22 15:56:36 +00:00
2025-07-29 19:28:54 +00:00
2025-11-20 12:35:44 +00:00
2025-10-22 15:56:36 +00:00
2025-11-24 21:41:05 +00:00
2025-10-22 15:56:36 +00:00
2025-10-31 07:41:39 +00:00
2025-08-30 02:32:35 +00:00
2025-09-10 17:42:45 +00:00
2025-12-04 22:09:25 +00:00
2025-12-04 22:09:25 +00:00
2025-12-04 22:09:25 +00:00
2025-11-24 19:43:14 +00:00
2025-08-19 22:09:01 +00:00
2025-11-04 15:43:44 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-08-31 16:19:04 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-06-30 00:07:35 +00:00
2025-08-06 22:40:42 +00:00
2025-10-22 15:56:36 +00:00
2025-11-13 09:51:15 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-11-29 01:23:47 +00:00
2025-10-22 15:56:36 +00:00
2025-12-02 12:53:35 +00:00
2025-10-29 21:01:45 +00:00
2025-12-02 12:53:35 +00:00
2025-10-30 14:46:10 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-11-29 01:23:47 +00:00
2025-05-28 10:19:31 +02:00
2025-11-20 12:35:44 +00:00
2025-10-29 21:03:12 +00:00
2025-10-22 15:56:36 +00:00
2025-07-17 22:15:01 +00:00
2025-12-05 18:01:27 +00:00
2025-03-03 22:35:05 +01:00
2025-12-04 22:09:25 +00:00
2025-11-24 21:41:05 +00:00
2025-11-24 08:37:55 +00:00
2025-10-23 17:16:42 +00:00
2025-10-22 15:56:36 +00:00
2025-07-29 19:28:54 +00:00
2025-04-02 21:33:50 +00:00
2025-07-08 06:47:08 +00:00
2025-12-04 22:09:25 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-07-29 19:28:54 +00:00
2025-10-28 22:00:57 +00:00
2025-11-21 13:01:33 +00:00
2025-10-22 15:56:36 +00:00
2025-10-27 14:29:53 +00:00
2025-10-16 14:41:12 +00:00
2025-12-04 22:09:25 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-06-29 19:41:34 +00:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-06-28 20:13:55 +02:00
2025-12-04 22:09:25 +00:00
2025-12-04 22:09:25 +00:00
2025-11-07 18:51:33 +00:00
2025-11-20 14:37:34 +00:00
2025-11-12 15:32:07 +00:00
2025-09-01 09:49:15 +00:00
2025-06-27 15:26:03 +00:00
2025-10-30 20:33:13 +01:00
2025-09-09 15:26:56 +02:00
2025-10-27 15:46:28 +00:00
2025-06-12 15:44:35 +02:00
2025-10-29 21:03:12 +00:00
2025-10-31 07:41:39 +00:00
2025-12-04 22:09:25 +00:00
2025-09-09 21:04:23 +00:00
2025-10-27 15:07:08 +00:00
2025-10-28 11:31:15 +00:00
2025-11-20 14:37:34 +00:00
2025-10-22 15:56:36 +00:00
2025-11-03 10:55:13 +00:00
2025-12-04 22:09:25 +00:00
2025-06-17 18:24:30 +02:00
2025-10-22 15:56:36 +00:00
2025-10-22 15:56:36 +00:00
2025-10-30 16:21:20 +00:00
2025-04-02 21:33:50 +00:00
2025-12-01 11:46:08 +00:00
2025-11-28 16:00:11 +00:00
2025-10-30 15:28:04 +00:00