feat(mcp): playwright-smart-table MCP inspector server (#108) - #157
Draft
rickcedwhat-ai wants to merge 30 commits into
Draft
feat(mcp): playwright-smart-table MCP inspector server (#108)#157rickcedwhat-ai wants to merge 30 commits into
rickcedwhat-ai wants to merge 30 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
19 tasks
rickcedwhat-ai
force-pushed
the
feat/mcp-custom-inspector-wip
branch
from
May 17, 2026 18:33
86ded1c to
b38390d
Compare
rickcedwhat
marked this pull request as ready for review
May 18, 2026 00:34
rickcedwhat
marked this pull request as draft
May 18, 2026 00:34
…#108) Step 1 of the MCP inspector plan (.agents/plans/mcp-inspector.md): - Add packages/mcp to pnpm workspace - packages/mcp/package.json: @rickcedwhat/playwright-smart-table-mcp@0.1.0 - deps: @modelcontextprotocol/sdk, zod - peerDep: @playwright/test - src/types.ts: full InspectTableFindings type surface (preset, virtualization, pagination, loading, selectorCandidates) — all sections typed up front so later steps fill them in without touching the public API - src/browser/launcher.ts: thin Playwright browser launch/teardown wrapper - src/detectors/preset.ts: pure preset fingerprinter (MUI DataGrid, MUI Table, RDG, Glide) — confidence = matched signals / total expected signals - src/tools/inspectTable.ts: MCP tool handler — navigates to URL, collects DOM signals via page.evaluate(), runs preset detection, stubs all other sections - src/index.ts: MCP server entry point (stdio transport) - tests/unit/preset.test.ts: 12 unit tests covering all presets, partial confidence, null cases, and disambiguation (all pass) - tests/fixtures/mui-datagrid-mock.html: static HTML for manual smoke testing via npx @modelcontextprotocol/inspector Next steps (Step 2): virtualization + pagination detection
…ed container names
…ector) Security / correctness: - inspector/App.tsx: escape code in dangerouslySetInnerHTML fallback (XSS) - mcp/launcher.ts: close browser if newContext() throws (process leak) - mcp/detectors/pagination.ts: escape aria-label in CSS attribute selectors - mcp/detectors/selectors.ts: guard against empty choices array - mcp/tools/generateConfig.ts: escape quotes/backslashes in selector literals - mcp/tools/inspectTable.ts: use empty arrays in mini-mode (not undefined) - mcp/tools/inspectTable.ts: propagate storageStatePath into launchBrowser Type safety: - mcp/utils/githubModels.ts: add GitHubModelItem + PersistedState interfaces - mcp/tests/unit/preset.test.ts: add missing DomSignals fields to makeSignals Structure / config: - inspector/tsconfig.node.json: moduleResolution Node -> Bundler - inspector/package.json: remove deprecated shadcn-ui runtime dependency - mcp/src/index.ts: call getLastState() per SSE session (not startup snapshot) - .gitignore: ignore packages/mcp/.mcp-state.json Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…type guards packages/inspector/src/App.tsx: - Hoist createHighlighter into a module-level singleton (getHighlighter) so themes/langs are loaded once across all CodeBlock instances instead of once per code change - Add cancelled flag to the highlight useEffect so stale async results from a previous code value cannot overwrite the current html state - Add cleanup to the MCP client useEffect: track mounted flag to guard all state setters after unmount, close the client on cleanup to tear down the SSE connection (fixes StrictMode double-invocation leak) packages/mcp/src/detectors/selectors.ts: - Guard parsed LLM JSON with Array.isArray before using row/cell/header fields so a non-array truthy value (e.g. an object) cannot reach callers packages/mcp/src/utils/githubModels.ts: - Validate API response with Array.isArray before casting to GitHubModelItem[] - Log errors in previously-silent catch blocks in getLastState/saveLastState Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…sage Snapshot content injected verbatim into the LLM prompt could override instructions (prompt injection via page-controlled DOM). - Add sanitizeSnapshot(): strips HTML comments and residual script/style blocks, collapses whitespace, enforces a 15 000-char hard cap - Move all LLM instructions to a system message so they cannot be overridden by snapshot content - Interpolate only structured signals (preset, virtualization) and the sanitized snapshot into the user message Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
rickcedwhat-ai
force-pushed
the
feat/mcp-custom-inspector-wip
branch
from
June 9, 2026 19:45
b38390d to
f455ecf
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP — do not merge
Full MCP inspector server implementation for issue #108. Includes:
packages/mcpscaffold withinspect_tableandpreset_detecttoolsgenerate_config/inspect_and_generateone-click config generationCloses
Closes #108
🤖 Generated with Claude Code