inspector/clients/tui/__tests__
Repository files (latest commit first)
Filename Latest commit message Latest commit date
cliffhall 1c595e96ee fix: dedupe a repeated name in a group, and name every unmet requirement
Addresses Copilot's round-13 review on #2035. Two suppressed comments, both
real, both in the required-group work from round 7 rather than in the recent
preview rework.

1. `{a,a}` is ONE requirement named twice, but `requiredGroups` stored it as
   a two-name group, so everything downstream read it as "either of these
   will do". The TUI was left with a form it could not submit: its
   `length === 1` test marked `a` optional while ResourceTestModal's guard
   still refused a blank. The web panel offered the useless hint
   "Any one of: a, a". Names are now deduplicated within the expression --
   expansion still emits both occurrences (`x://{a,a}` -> `x://1,1`), which
   RFC 6570 requires.

2. The per-field hint used `find`, so a variable in several shared groups
   advertised only the first. With `{a,b}{b,c}{a,c}`, filling `b` satisfies
   the first two and every visible hint then looks met while Read Resource
   stays disabled on the unmet `{a,c}` -- a requirement with nothing on
   screen pointing at it.

   Fields now hint every shared group they sit in. That alone is not enough,
   because no per-field hint can say WHICH group is still outstanding, so
   the form states it directly: "Still needed: a or c", built from the same
   `unmetRequiredGroups` the submit gate uses, so the message and the button
   cannot disagree. `hasRequiredValues` is no longer called here -- the
   panel derives both from the one list.

npm run ci passes.

Signed-off-by: cliffhall <cliff@futurescale.com>
2026-08-17 00:33:52 -04:00
..
helpers test(cli,tui): typecheck the __tests__ dirs (#1791) (#1799) 2026-07-27 12:05:35 -04:00
App.test.tsx Merge pull request #2039 from modelcontextprotocol/v2/chore/1959-no-floating-promises 2026-08-16 22:35:52 -04:00
AuthTab.test.tsx test(cli,tui): typecheck the __tests__ dirs (#1791) (#1799) 2026-07-27 12:05:35 -04:00
DetailsModal.test.tsx test(tui): extend coverage gate to Ink components + App.tsx (closes #1501) (#1538) 2026-06-29 08:19:12 -04:00
HistoryTab.test.tsx test(cli,tui): typecheck the __tests__ dirs (#1791) (#1799) 2026-07-27 12:05:35 -04:00
InfoTab.test.tsx chore: close quality-gate coverage gaps (#1689) (#1766) 2026-07-24 17:20:12 -04:00
logger.test.ts test: raise per-file coverage gate to 90 across all clients (closes #1271) (#1532) 2026-06-27 15:26:03 -04:00
NotificationsTab.test.tsx Fixed tab naming to correspond to the web client. (#1780) 2026-07-25 20:11:52 -04:00
oauthDisplay.test.ts Guided-auth removal, OAuth smoke testing, and TUI/CLI support (#1531) 2026-06-29 15:35:51 -04:00
openUrl.test.ts test(cli,tui): add in-process source coverage gates (#1484) (#1502) 2026-06-20 15:05:58 -04:00
promptArgsToForm.test.ts test(cli,tui): add in-process source coverage gates (#1484) (#1502) 2026-06-20 15:05:58 -04:00
PromptsTab.test.tsx SDK v2 migration (behavior-neutral, versionNegotiation: 'legacy') (#1624) 2026-07-15 10:44:24 -04:00
PromptTestModal.test.tsx SDK v2 migration (behavior-neutral, versionNegotiation: 'legacy') (#1624) 2026-07-15 10:44:24 -04:00
RequestsTab.test.tsx Fixed tab naming to correspond to the web client. (#1780) 2026-07-25 20:11:52 -04:00
ResourcesTab.test.tsx SDK v2 migration (behavior-neutral, versionNegotiation: 'legacy') (#1624) 2026-07-15 10:44:24 -04:00
ResourceTestModal.test.tsx fix: honor a defined-but-empty value, and announce the expansion error 2026-08-16 23:08:30 -04:00
schemaToForm.test.ts fix: strip the enum null sentinel, and make the preset test cover its wiring 2026-08-15 18:28:38 -04:00
SelectableItem.test.tsx test(tui): extend coverage gate to Ink components + App.tsx (closes #1501) (#1538) 2026-06-29 08:19:12 -04:00
setup.ts test(tui): extend coverage gate to Ink components + App.tsx (closes #1501) (#1538) 2026-06-29 08:19:12 -04:00
Tabs.test.tsx Fixed tab naming to correspond to the web client. (#1780) 2026-07-25 20:11:52 -04:00
ToolsTab.test.tsx SDK v2 migration (behavior-neutral, versionNegotiation: 'legacy') (#1624) 2026-07-15 10:44:24 -04:00
ToolTestModal.test.tsx SDK v2 migration (behavior-neutral, versionNegotiation: 'legacy') (#1624) 2026-07-15 10:44:24 -04:00
tsupConfig.test.ts chore(lint): enable no-floating-promises in all five ESLint scopes 2026-08-16 20:57:32 -04:00
tui-servers.test.ts Guided-auth removal, OAuth smoke testing, and TUI/CLI support (#1531) 2026-06-29 15:35:51 -04:00
tui.test.ts Fixed tab naming to correspond to the web client. (#1780) 2026-07-25 20:11:52 -04:00
tuiOAuth.test.ts test(cli,tui): typecheck the __tests__ dirs (#1791) (#1799) 2026-07-27 12:05:35 -04:00
uriTemplateToForm.test.ts fix: dedupe a repeated name in a group, and name every unmet requirement 2026-08-17 00:33:52 -04:00
useSelectableList.test.tsx test(tui): extend coverage gate to Ink components + App.tsx (closes #1501) (#1538) 2026-06-29 08:19:12 -04:00