Skip to content

feat: add Request Log tab for real-time request monitoring#125

Closed
custardcream98 wants to merge 4 commits into
mainfrom
feat/request-log-v2
Closed

feat: add Request Log tab for real-time request monitoring#125
custardcream98 wants to merge 4 commits into
mainfrom
feat/request-log-v2

Conversation

@custardcream98

Copy link
Copy Markdown
Owner

Summary

Add a 4th Log tab to MSW Devtools for real-time request/response monitoring.

Features

  • Real-time logging of matched/unmatched MSW requests
  • Log entries with timestamp, method, status, URL, duration, matched/unmatched icon
  • Expandable accordion for request/response body inspection
  • "Add Mock for this URL" shortcut on unmatched requests
  • Recording toggle, clear, All/Matched/Unmatched filter
  • Unread badge on Log tab
  • Early capture buffer for page-load requests
  • Static asset filtering (.js/.css/@vite/)
  • 200 entry FIFO, memory only
  • Full i18n (EN/KO)

Changeset

@custardcream/msw-devtools minor

Test plan

  • pnpm build success
  • pnpm type-check pass
  • pnpm lint pass
  • pnpm test 139 tests pass

🤖 Generated with Claude Code

custardcream98 and others added 4 commits March 21, 2026 12:33
- Add Tab.Log to constants.ts
- Add Log TabButton in TabBar (before Settings)
- Add LogTab placeholder component with empty state message
- Wire LogTab in TabBody conditional rendering
- Add i18n keys for tab label, controls, and log UI text in both EN and KO

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add LogTab with recording toggle, clear, matched/unmatched filter controls
- Add LogEntry with accordion: time, MethodPill, status, URL, duration, matched icon
- Add LogDetail with CodeEditor for request/response body (readOnly)
- Add "Add Mock for this URL" button on unmatched requests -> navigates to AddMock tab
- Add unread badge on Log tab button in TabBar
- Move RequestLogProvider to DevTools.tsx (wraps both TabBar and TabBody)
- Integrate fe's RequestLogContext with Tab.Log constant (replace TAB_LOG workaround)
- Auto-scroll to newest log entry, reset unread count on tab entry

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add RequestLogContext with MSW event subscription and early buffer
  for capturing requests before React tree mounts
- Filter out static assets (.js, .css, @vite/) from log entries
- Fix body display timing: create entries synchronously, parse body async
- Clean up early capture listeners after drain (prevent memory leak)
- Move shouldCaptureRequest to request-log.tsx (SRP: worker.ts stays pure)
- Add i18n key for "No body data available" (was hardcoded English)
- Convert all Korean comments to English across LogTab components
- Add changeset for minor version bump

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Mar 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated (UTC)
msw-devtools Ignored Ignored Mar 21, 2026 6:19am
msw-devtools-docs Ignored Ignored Mar 21, 2026 6:19am
msw-devtools-vue Ignored Ignored Mar 21, 2026 6:19am

Request Review

@custardcream98

Copy link
Copy Markdown
Owner Author

Replaced with test fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant