Skip to content

feat: enhance debug interaction logs#708

Open
tu11aa wants to merge 3 commits intodevelopfrom
feat/enhanced-interaction-logs
Open

feat: enhance debug interaction logs#708
tu11aa wants to merge 3 commits intodevelopfrom
feat/enhanced-interaction-logs

Conversation

@tu11aa
Copy link
Copy Markdown
Collaborator

@tu11aa tu11aa commented Mar 31, 2026

Summary

  • Richer logging: Added call type (read/write), duration tracking, decoded results, and detailed error capture to history entries
  • Search & filter: Search by function name + filter chips (All/Read/Write/Success/Error) on the history pane
  • Export & clear: Export filtered history as JSON or CSV, clear history per contract
  • Improved modal: Shows call type badge, duration, gas used, decoded result section, collapsible error details, and copy-to-clipboard

Files changed

  • services/store/history.ts — Extended HistoryEntry type with callType, decodedResult, gasUsed, duration, errorDetails
  • ReadOnlyFunctionForm.tsx — Async read with duration tracking, decoded result capture, error handling
  • WriteOnlyFunctionForm.tsx — Duration tracking, error details capture
  • history/DebugHistory.tsx — Search bar, filter chips, export JSON/CSV, clear button, R/W badges
  • history/HistoryModal.tsx — Richer detail display, copy entry as JSON

Test plan

  • Trigger read calls and verify history logs with decoded result and duration
  • Trigger write calls and verify history logs with tx hash and duration
  • Trigger failing calls and verify error details are captured
  • Test search filtering by function name
  • Test filter chips (Read, Write, Success, Error) individually and combined
  • Export as JSON and CSV, verify file contents
  • Clear history and verify it resets
  • Open modal and verify all new fields display correctly
  • Click "Copy" in modal and verify JSON is copied to clipboard

tu11aa added 2 commits March 31, 2026 16:06
Add richer logging (call type, duration, decoded results, error details),
search by function name, filter chips (Read/Write/Success/Error),
JSON/CSV export, clear history, and improved modal with copy-to-clipboard.
…nsistency

- Add console.warn in empty catch blocks for history logging failures
- Restyle history pane to match Read/Write panel (purple border card, tabs-box header)
- Use consistent rounded-[5px] borders, bg-component, and border-[#8A45FC]
- Improve search bar, filter chips, and toolbar styling for dark/light themes
- Extract StatusIcon outside component body to avoid re-renders
- Clean up modal layout with meta info row and consistent section styling
@tu11aa tu11aa force-pushed the feat/enhanced-interaction-logs branch from fc7ee12 to 622ade0 Compare March 31, 2026 09:10
Replace R/W text with EyeIcon (read) and PencilSquareIcon (write)
from @heroicons/react for better visual clarity.
@tu11aa tu11aa requested a review from metalboyrick March 31, 2026 09:14
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