Skip to content

Add iOS debugging guidance and layer architecture docs to prevent tunnel vision failures#33633

Closed
Copilot wants to merge 2 commits intoinflight/currentfrom
copilot/improve-pr-agent-success
Closed

Add iOS debugging guidance and layer architecture docs to prevent tunnel vision failures#33633
Copilot wants to merge 2 commits intoinflight/currentfrom
copilot/improve-pr-agent-success

Conversation

Copy link
Contributor

Copilot AI commented Jan 20, 2026

Context

PR #33353 revealed an agent failure mode: 11 attempts patching ShellSectionRootRenderer (where stack trace pointed), but the fix was removing that duplicate and enhancing PageViewController (Core layer). Agent never searched for duplicates or understood layer separation.

Changes

New Documentation

.github/instructions/ios-debugging.instructions.md - iOS platform debugging patterns

  • Search method patterns across codebase, not just stack trace location
  • Detect duplicate implementations with grep -r "MethodName" src/
  • "Remove vs Patch" decision tree for obsolete code
  • Layer architecture (Core vs Controls vs Compatibility)

.github/architecture/core-vs-controls.md - Layer responsibility quick reference

  • Decision matrix: Core (all pages) vs Controls (specific controls)
  • Common mistakes (Core functionality in Controls, duplication)
  • iOS lifecycle method placement guide

Enhanced Workflow

.github/skills/try-fix/SKILL.md - Added Step 3: Search for Duplicate Implementations

# Before patching, check for duplicates across layers
grep -r "override.*TraitCollectionDidChange" src/
find src/Core src/Controls -name "*.cs" -exec grep -l "MethodName" {} \;

Code Documentation

Added layer responsibility comments to:

Integration

.github/copilot-instructions.md - Added "Understanding Core vs Controls Layers" section with references

Impact

Future agents facing similar iOS crashes will:

  1. Search for method patterns across layers (not just named file)
  2. Detect duplicates between Core/Controls implementations
  3. Consider removing obsolete code vs patching
  4. Understand layer separation (Core = all pages, Controls = specific)

Directly addresses the tunnel vision pattern where agents trust stack traces without verifying if functionality is duplicated elsewhere.

Original prompt

Please review the following PR #33353 and recommend areas where we could have improved our repository so the pr agent can be more successul in the future

Custom agent used: learn-from-pr
Analyzes completed PRs for lessons learned, then applies improvements to instruction files, skills, and documentation.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…itecture docs, and duplication detection

Co-authored-by: PureWeen <5375137+PureWeen@users.noreply.github.com>
Copilot AI changed the title [WIP] Reviewing PR for repository improvement suggestions Add iOS debugging guidance and layer architecture docs to prevent tunnel vision failures Jan 20, 2026
Copilot AI requested a review from PureWeen January 20, 2026 21:39
@PureWeen PureWeen closed this Jan 20, 2026
@kubaflo kubaflo added the area-ai-agents Copilot CLI agents, agent skills, AI-assisted development label Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-ai-agents Copilot CLI agents, agent skills, AI-assisted development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments