Skip to content

feat(docs): add frontend debugging guide with browser verification patterns#69

Merged
marcusquinn merged 1 commit intomainfrom
feature/frontend-debugging-patterns
Jan 13, 2026
Merged

feat(docs): add frontend debugging guide with browser verification patterns#69
marcusquinn merged 1 commit intomainfrom
feature/frontend-debugging-patterns

Conversation

@marcusquinn
Copy link
Owner

@marcusquinn marcusquinn commented Jan 13, 2026

Summary

Adds documentation and progressive disclosure patterns learned from an AwardsApp debugging session where:

  • curl returned HTTP 200 with valid HTML
  • Browser showed "Something went wrong" React hydration error
  • Root cause was SVGR webpack loader not working across monorepo package boundaries

Changes

  • New: tools/ui/frontend-debugging.md - Comprehensive guide covering:

    • Browser verification rule (why curl lies for frontend)
    • React hydration error patterns ("got: object" debugging)
    • Monorepo package boundary gotchas (SVGR, webpack loaders)
    • Step-by-step debugging workflow
  • Updated: workflows/bug-fixing.md - Added frontend verification warning

  • Updated: AGENTS.md - Progressive disclosure trigger for frontend debugging

Key Learnings Documented

Pattern Lesson
SVGR in monorepos Webpack loaders only work within app pipeline, not shared packages
Frontend verification Never trust curl/HTTP status - always use browser screenshot
Hydration errors "got: object" means import returning wrong type

Testing

These are documentation-only changes. After merge, run ./setup.sh to deploy.

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive Frontend Debugging Guide covering browser verification, hydration error handling, and monorepo troubleshooting
    • Enhanced UI tooling documentation with frontend debugging capabilities
    • Updated bug-fixing guidance with browser-based verification workflow for frontend issues

✏️ Tip: You can customize this high-level summary in your review settings.

…tterns

- Add tools/ui/frontend-debugging.md covering hydration errors, monorepo gotchas
- Update bug-fixing workflow with frontend verification warning
- Add progressive disclosure trigger for frontend debugging
- Store memory entries for SVGR, curl verification, hydration patterns

Learned from AwardsApp session where curl returned 200 but site showed
React hydration error. Browser screenshot revealed the actual issue.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 13, 2026

Walkthrough

This PR introduces a comprehensive Frontend Debugging Guide to the agent tooling ecosystem, registers it in the agent manifest under UI tooling, and extends bug-fixing workflows with critical browser-based verification guidance to replace unreliable HTTP status code checks.

Changes

Cohort / File(s) Summary
Agent Registry Updates
.agent/AGENTS.md
Added Frontend debugging as a subagent under UI tooling with expanded description; registered new reference to tools/ui/frontend-debugging.md in the subagent folders section.
Frontend Debugging Guide
.agent/tools/ui/frontend-debugging.md
New comprehensive guide covering browser verification patterns, hydration error handling, monorepo debugging, SVGR/CSS/module import troubleshooting, and scripted browser-based workflows with detection checklists and concrete debugging steps.
Bug-Fixing Workflow Enhancement
.agent/workflows/bug-fixing.md
Added "Frontend Bug Verification (CRITICAL)" section demonstrating BAD (curl-based) vs. GOOD (browser-based) verification with examples and reference to the frontend debugging workflow.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🌐 A browser view beats curl's deceptive glance,
Hydration errors now get their rightful stance,
Frontend bugs caught where they truly dance—
In rendered reality, not server response trance,
Debugging wisdom in DevOps' advance! 🚀

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely summarizes the main change: adding a frontend debugging guide with browser verification patterns, which matches the PR's primary deliverables.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link

Summary of Changes

Hello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a crucial documentation resource aimed at improving the debugging process for frontend applications, particularly those built with React/Next.js within a monorepo structure. It provides clear guidance on common pitfalls such as the unreliability of curl for verifying client-side fixes, understanding and resolving React hydration errors, and navigating the complexities of webpack loaders in shared monorepo packages. The changes ensure that developers have a structured approach and practical solutions for diagnosing and fixing frontend issues.

Highlights

  • New Frontend Debugging Guide: A comprehensive guide (tools/ui/frontend-debugging.md) has been added to address common frontend debugging challenges, particularly in React/Next.js applications within monorepos.
  • Browser Verification Rule: The guide introduces a critical rule emphasizing that curl responses are unreliable for verifying frontend fixes, mandating actual browser rendering for verification due to client-side hydration issues.
  • Monorepo Webpack Loader Gotchas: Detailed explanations and solutions are provided for issues where webpack loaders (like SVGR) do not function as expected across monorepo package boundaries, leading to incorrect import types.
  • Documentation Integration: Existing documentation files (AGENTS.md and workflows/bug-fixing.md) have been updated to reference the new frontend debugging guide and incorporate its key learnings, ensuring discoverability and consistent practices.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@sonarqubecloud
Copy link

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 256 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Tue Jan 13 14:22:42 UTC 2026: Code review monitoring started
Tue Jan 13 14:22:43 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 256
Tue Jan 13 14:22:43 UTC 2026: Qlty - 0 issues found, auto-formatting applied
Tue Jan 13 14:22:45 UTC 2026: Codacy analysis completed with auto-fixes

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 256
  • VULNERABILITIES: 0

Generated on: Tue Jan 13 14:23:23 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds excellent and much-needed documentation on frontend debugging, covering crucial topics like browser verification over curl, React hydration errors, and common monorepo pitfalls with webpack loaders. The new guide is comprehensive, well-structured, and provides actionable code examples and scripts. The updates to AGENTS.md and bug-fixing.md effectively integrate this new knowledge into existing workflows. My review includes a couple of minor suggestions for the new guide to improve the robustness of a script and the internal consistency of an example.

Comment on lines +75 to +80
const hasError = await page.evaluate(() => {
const body = document.body.innerText;
return body.includes("Something went wrong") ||
body.includes("Error:") ||
body.includes("Unhandled Runtime Error");
});

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For more robust error detection, it's a good practice to make the search for error messages case-insensitive. This will prevent missing errors that might be capitalized differently (e.g., "error:" vs "Error:").

Suggested change
const hasError = await page.evaluate(() => {
const body = document.body.innerText;
return body.includes("Something went wrong") ||
body.includes("Error:") ||
body.includes("Unhandled Runtime Error");
});
const hasError = await page.evaluate(() => {
const body = document.body.innerText.toLowerCase();
return body.includes("something went wrong") ||
body.includes("error:") ||
body.includes("unhandled runtime error");
});

**Option 1: Inline SVG Components (Recommended)**

```typescript
// packages/ui/shared/src/assets/icons.tsx

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with the file structure example provided earlier in the document (lines 157-161), the file path in this comment should probably be // packages/ui/src/assets/icons.tsx or simply // packages/ui/src/icons.tsx. The current path introduces a shared directory which wasn't mentioned before, potentially causing confusion.

Suggested change
// packages/ui/shared/src/assets/icons.tsx
// packages/ui/src/assets/icons.tsx

@augmentcode
Copy link

augmentcode bot commented Jan 13, 2026

🤖 Augment PR Summary

Summary: Adds a frontend debugging guide that codifies a key lesson from a React/Next.js incident: a 200 OK HTML response doesn’t guarantee the browser app is working.

Changes:

  • Added .agent/tools/ui/frontend-debugging.md with a browser-first verification workflow, common hydration error interpretations (incl. “got: object”), and monorepo package-boundary pitfalls (SVGR/webpack loaders).
  • Updated .agent/workflows/bug-fixing.md to include a prominent “Frontend Bug Verification” section warning against relying on curl/HTTP 200 for frontend fixes.
  • Updated .agent/AGENTS.md to improve discoverability (keywords + progressive disclosure link to the new guide).

Technical Notes: The guidance centers on validating fixes via dev-browser screenshots/console output because SSR error boundaries can still render successfully while client-side hydration fails.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
.agent/tools/ui/frontend-debugging.md (1)

60-93: Consider adding connection error handling guidance.

The browser verification script is well-structured, but could benefit from basic error handling if dev-browser isn't running or the connection fails.

💡 Optional: Add error handling example

Consider adding a note about verifying the dev-browser is accessible before the script:

# Verify dev-browser is running before attempting verification
if ! curl -s http://localhost:9222/json/version >/dev/null 2>&1; then
  echo "ERROR: dev-browser not responding on port 9222"
  echo "Run: bash ~/.aidevops/agents/scripts/dev-browser-helper.sh start"
  exit 1
fi

# Then proceed with the TypeScript verification...

This helps users diagnose connectivity issues more quickly.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f889080 and 516ab6c.

📒 Files selected for processing (3)
  • .agent/AGENTS.md
  • .agent/tools/ui/frontend-debugging.md
  • .agent/workflows/bug-fixing.md
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2026-01-06T15:57:56.007Z
Learnt from: CR
Repo: marcusquinn/aidevops PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-06T15:57:56.007Z
Learning: Applies to **/.agent/scripts/linters-local.sh : Run quality checks before committing using .agent/scripts/linters-local.sh

Applied to files:

  • .agent/workflows/bug-fixing.md
📚 Learning: 2025-12-22T01:24:53.937Z
Learnt from: CR
Repo: marcusquinn/aidevops PR: 0
File: templates/home/AGENTS.md:0-0
Timestamp: 2025-12-22T01:24:53.937Z
Learning: Follow all security protocols and working directory specifications defined in ~/Git/aidevops/AGENTS.md

Applied to files:

  • .agent/workflows/bug-fixing.md
📚 Learning: 2025-11-29T04:34:42.033Z
Learnt from: CR
Repo: marcusquinn/aidevops PR: 0
File: AGENT.md:0-0
Timestamp: 2025-11-29T04:34:42.033Z
Learning: Reference AGENTS.md (authoritative) instead of AGENT.md for AI assistant guidance

Applied to files:

  • .agent/AGENTS.md
📚 Learning: 2026-01-06T15:57:56.008Z
Learnt from: CR
Repo: marcusquinn/aidevops PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-06T15:57:56.008Z
Learning: Applies to **/AGENTS.md : Use progressive disclosure in AGENTS.md with pointers to subagents rather than inline content

Applied to files:

  • .agent/AGENTS.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (9)
.agent/tools/ui/frontend-debugging.md (6)

1-13: LGTM! Well-configured frontmatter.

The tool permissions are appropriately scoped for a debugging guide—read-only with bash/grep for verification scripts, no write permissions to prevent accidental modifications during debugging.


15-33: Excellent progressive disclosure pattern.

The Quick Reference provides clear triggers for when to consult this guide, and the golden rule ("Always verify frontend fixes with browser screenshot, never trust curl alone") is prominently featured for quick scanning.


106-144: Excellent capture of real-world debugging patterns!

The hydration errors section documents valuable tribal knowledge, especially the "got: object" pattern derived from actual debugging sessions. The table of error messages with causes and solutions provides quick reference value, and the SVGR import example clearly demonstrates the monorepo package boundary issue.


146-226: Comprehensive and technically accurate monorepo guidance.

This section clearly explains the webpack loader boundary issue and provides three viable solutions with appropriate trade-offs. Marking inline SVG components as the recommended approach is sound advice for simplicity and maintainability. The detection checklist provides actionable prevention measures.


228-278: Clear step-by-step debugging workflow.

The five-step workflow provides a logical progression from reproduction through verification, with practical scripts for each step. The console error capture in Step 2 properly uses CDP event listeners, and Step 4's typeof debugging is a pragmatic approach to identifying import type issues.


280-284: Appropriate cross-references to related documentation.

The related resources provide logical navigation paths to browser automation, React patterns, and build debugging workflows.

.agent/workflows/bug-fixing.md (1)

94-112: Excellent integration of frontend verification guidance.

The new section is strategically placed within the Testing workflow, uses consistent examples and explanations from the detailed frontend-debugging.md guide, and appropriately uses progressive disclosure by referencing the full workflow rather than duplicating it.

The (CRITICAL) emphasis is warranted given that curl-based verification is a common pitfall that wastes debugging time.

.agent/AGENTS.md (2)

384-384: Proper integration into Subagent Folders table.

The tools/ui/ row is correctly updated to include frontend-debugging in both the description (mentioning hydration errors as a key topic) and the key subagents list, maintaining consistency with the table format.


460-460: Progressive disclosure entry properly added.

The new row follows the table format, correctly references the frontend-debugging.md path, and highlights the key topics (hydration errors, monorepo gotchas) that would trigger an AI to consult this guide. Placement near browser automation is logical for frontend-related task grouping.

@marcusquinn marcusquinn merged commit 1cf1617 into main Jan 13, 2026
15 of 17 checks passed
@marcusquinn marcusquinn deleted the feature/frontend-debugging-patterns branch January 13, 2026 22:48
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