[iOS][Shell] Fix navigation lifecycle and back button for More tab (>5 tabs)#27932
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/rebase |
70b68eb to
302842d
Compare
|
Azure Pipelines successfully started running 3 pipeline(s). |
| [Test] | ||
| [Category(UITestCategories.Shell)] | ||
| [Category(UITestCategories.Navigation)] | ||
| public void ShellBackButtonBehaviorShouldWorkWithMoreTab() |
There was a problem hiding this comment.
The test is failing on Android, Mac and Windows:
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2352
at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2369
at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 665
at Microsoft.Maui.TestCases.Tests.Issues.Issue27800.ShellBackButtonBehaviorShouldWorkWithMoreTab() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue27800.cs:line 22
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
There was a problem hiding this comment.
Okay, it should be the iOS-only test. I've fixed it. Thanks for letting me know!
302842d to
21543e4
Compare
21543e4 to
009b63d
Compare
|
@jsuarezruiz can you please /azp? |
…ture Key improvements: - Check if phase comment exists BEFORE posting (prevents duplicates) - Extract actual content from state file sections instead of simplified summaries - Match state file structure with collapsible <details> sections - Include full tables (Files Changed, Fix Candidates with all columns) - No update mode - each phase gets ONE comment only - Better duplicate detection during recursive calls Fixes issues: - Duplicate Tests comment posted on PR dotnet#27932 - Comments didn't match state file structure (missing subsections) - Fix Candidates table missing columns (Source, Approach, Test Result, etc.) Fix pr-comment script to support stdin and update agent invocation Fix pr-comment invocation in agent instructions - use aggregated format fix: Improve phase status parsing in pr-comment script - Better regex for phase status table parsing - Handles various table formats correctly - Add state file for PR dotnet#27932 review session feat: Replace pr-comment with aggregated single-comment format - Posts ONE comment for entire review (not 5 separate comments) - Minimal vertical space when collapsed - All 5 phases in expandable sections - Updates existing comment as phases complete - Simpler parameter: just Content (no Phase parameter) Add horizontal separators between review sessions in PR comments - Add --- separator when appending new sessions to existing comments - Fix recursive call to use -Content instead of removed -StateFile parameter - Improves visual distinction between multiple review sessions - Makes review history clearer and easier to follow Add horizontal rule separators to PR comments for better visual structure - Replace <br> with --- after phase headers - Add --- after Review Session summary tags - Improves visual separation between sections - Makes comments more readable and structured Remove review session numbering from PR comments Simplify comment format by removing session numbers: - Removed reviewNumber variable and counting logic - Changed header from 'Review Session 1' to just 'Review Session' - Session still expandable with commit link, just no sequential numbering Rationale: - Session numbering adds complexity without clear value - Commit links already provide traceability - Cleaner, simpler format for users Improve PR comment visual spacing and readability Visual improvements for better GitHub rendering: Changes: - Replaced horizontal rules (---) with <br> tags after headers - Added <br> spacing between nested sections in Pre-Flight - Added <br> spacing after Review Session summary in all phases - Added <br> inside nested <details> for breathing room - Consistent spacing between all content blocks Result: - Cleaner, more professional appearance - Better visual hierarchy - Improved readability on GitHub - Less cramped layout Remove all references to external files from pr-comment skill Complete refactoring to make skill truly self-contained: - Removed StateFile parameter entirely - Content parameter now mandatory (single source of truth) - No knowledge of where content comes from - No external file dependencies - Script only cares about: PR number, phase, content - Caller decides where content comes from (agent extracts, manual input, etc.) Documentation updated: - Removed all mentions of external sources - Simplified to: just pass content - No coupling to any particular workflow or file structure Benefits: - Pure function: inputs → output - No hidden dependencies - Works in any context - Easy to understand and maintain Make pr-comment skill state-file-independent Key Changes: - StateFile parameter now OPTIONAL (not mandatory) - Added Content parameter for direct content posting - Comments are self-contained - state file only needed at POST time - Once posted, comments can be updated without state file - Supports both modes: extract from state file OR post direct content Benefits: - State files can be deleted after review without breaking comments - Comments remain complete and readable independently - More flexible usage patterns (manual updates, automated workflows) - No hard dependency on state file persistence Use HTML tags in Review Session header for <summary> compatibility <summary> tags don't support markdown syntax, so use raw HTML: - <strong> for bold text - <a href="..."><code>SHA</code></a> for clickable code-formatted link - Ensures proper rendering in GitHub PR comments Format: 📝 <strong>Review Session 1</strong> — <strong>Title</strong> · <a href="..."><code>abc1234</code></a> Polish Review Session header format with bold title and SHA Format: 📝 **Review Session 1** — **Commit Title** · [`abc1234`](commit-url) - Bold 'Review Session N' - Bold commit title - Middle dot separator (·) - Short SHA in code formatting - SHA is clickable link to full commit - Clean, professional appearance Make commit title clickable in Review Session headers - Fetch both commit message and SHA from GitHub API - Create markdown link: [Commit Title](commit URL) - Users can click to view the commit that triggered the review - Better traceability for multiple review sessions on same PR Polish comment formatting with em dashes and bold status - Phase headers: Use em dash (—) instead of colon - Status values: Bold formatting (**SUCCESS**, **FAILED**, etc.) - Add horizontal rules (---) after headers and session summaries - Consistent spacing throughout all phases - Professional, polished appearance for PR comments Improve comment structure: only nest subsections for pre-flight - Pre-flight: Keeps nested <details> for 3 subsections (Issue/Files/Discussion) - Other phases: Content directly in Review Session (no extra nesting) - Added spacing after Review Session header for better visual appeal - Cleaner, more readable comments for single-content phases Make pr-comment skill self-contained (no state file dependency) - Comments now store extracted state file content internally - No references to state files (which may be deleted) - Nested <details> structure preserves all sections - When state file is deleted, comments remain complete - Supports appending new Review Sessions with full content pr comment skill improvement Post pr comment skill Post pr comment skill - improved
Updated SKILL.md to require posting/updating a collapsible PR comment documenting all try-fix attempts. Added post-try-fix-comment.ps1 PowerShell script to automate creation and updating of a single, double-collapsible comment on PRs, improving reviewer experience and attempt tracking. Post pr comment skill - improved Update pr-finalize skill Improve agent skills and add Android platform instructions - try-fix: Add Step 5.5 for iterating through compile errors (up to 3 times) - try-fix: Add compile-errors.md reference with common patterns - Add android.instructions.md with namespace collision guidance and lifecycle best practices - pr-comment, pr-finalize, learn-from-pr: Various improvements - pr agent: Updates to post-gate phase Update verify-tests-fail-without-fix skill to generate Gate section for PR agent - Generate Gate section markdown to CustomAgentLogsTmp/PRState/verification-report.md - Gate section matches PR agent session format for easy incorporation - Includes test verification results, fix files, and detailed summary - Updated documentation with output file locations Update skills: Make baseline script mandatory in try-fix, use PR-specific output folders - try-fix: Change Step 2 and Step 9 to MANDATORY, emphasize always using EstablishBrokenBaseline.ps1 - try-fix: Add warnings against manual git checkout operations - verify-tests-fail: Update output structure to use PRState/<PRNumber>/verify-tests-fail/ - verify-tests-fail: Add PR number auto-detection from branch name or gh pr view Update try-fix skill with improved structure and validation Update verify-tests-fail.ps1 Improve pr-comment skill: prevent duplicates, mirror state file structure Key improvements: - Check if phase comment exists BEFORE posting (prevents duplicates) - Extract actual content from state file sections instead of simplified summaries - Match state file structure with collapsible <details> sections - Include full tables (Files Changed, Fix Candidates with all columns) - No update mode - each phase gets ONE comment only - Better duplicate detection during recursive calls Fixes issues: - Duplicate Tests comment posted on PR dotnet#27932 - Comments didn't match state file structure (missing subsections) - Fix Candidates table missing columns (Source, Approach, Test Result, etc.) Fix pr-comment script to support stdin and update agent invocation Fix pr-comment invocation in agent instructions - use aggregated format fix: Improve phase status parsing in pr-comment script - Better regex for phase status table parsing - Handles various table formats correctly - Add state file for PR dotnet#27932 review session feat: Replace pr-comment with aggregated single-comment format - Posts ONE comment for entire review (not 5 separate comments) - Minimal vertical space when collapsed - All 5 phases in expandable sections - Updates existing comment as phases complete - Simpler parameter: just Content (no Phase parameter) Add horizontal separators between review sessions in PR comments - Add --- separator when appending new sessions to existing comments - Fix recursive call to use -Content instead of removed -StateFile parameter - Improves visual distinction between multiple review sessions - Makes review history clearer and easier to follow Add horizontal rule separators to PR comments for better visual structure - Replace <br> with --- after phase headers - Add --- after Review Session summary tags - Improves visual separation between sections - Makes comments more readable and structured Remove review session numbering from PR comments Simplify comment format by removing session numbers: - Removed reviewNumber variable and counting logic - Changed header from 'Review Session 1' to just 'Review Session' - Session still expandable with commit link, just no sequential numbering Rationale: - Session numbering adds complexity without clear value - Commit links already provide traceability - Cleaner, simpler format for users Improve PR comment visual spacing and readability Visual improvements for better GitHub rendering: Changes: - Replaced horizontal rules (---) with <br> tags after headers - Added <br> spacing between nested sections in Pre-Flight - Added <br> spacing after Review Session summary in all phases - Added <br> inside nested <details> for breathing room - Consistent spacing between all content blocks Result: - Cleaner, more professional appearance - Better visual hierarchy - Improved readability on GitHub - Less cramped layout Remove all references to external files from pr-comment skill Complete refactoring to make skill truly self-contained: - Removed StateFile parameter entirely - Content parameter now mandatory (single source of truth) - No knowledge of where content comes from - No external file dependencies - Script only cares about: PR number, phase, content - Caller decides where content comes from (agent extracts, manual input, etc.) Documentation updated: - Removed all mentions of external sources - Simplified to: just pass content - No coupling to any particular workflow or file structure Benefits: - Pure function: inputs → output - No hidden dependencies - Works in any context - Easy to understand and maintain Make pr-comment skill state-file-independent Key Changes: - StateFile parameter now OPTIONAL (not mandatory) - Added Content parameter for direct content posting - Comments are self-contained - state file only needed at POST time - Once posted, comments can be updated without state file - Supports both modes: extract from state file OR post direct content Benefits: - State files can be deleted after review without breaking comments - Comments remain complete and readable independently - More flexible usage patterns (manual updates, automated workflows) - No hard dependency on state file persistence Use HTML tags in Review Session header for <summary> compatibility <summary> tags don't support markdown syntax, so use raw HTML: - <strong> for bold text - <a href="..."><code>SHA</code></a> for clickable code-formatted link - Ensures proper rendering in GitHub PR comments Format: 📝 <strong>Review Session 1</strong> — <strong>Title</strong> · <a href="..."><code>abc1234</code></a> Polish Review Session header format with bold title and SHA Format: 📝 **Review Session 1** — **Commit Title** · [`abc1234`](commit-url) - Bold 'Review Session N' - Bold commit title - Middle dot separator (·) - Short SHA in code formatting - SHA is clickable link to full commit - Clean, professional appearance Make commit title clickable in Review Session headers - Fetch both commit message and SHA from GitHub API - Create markdown link: [Commit Title](commit URL) - Users can click to view the commit that triggered the review - Better traceability for multiple review sessions on same PR Polish comment formatting with em dashes and bold status - Phase headers: Use em dash (—) instead of colon - Status values: Bold formatting (**SUCCESS**, **FAILED**, etc.) - Add horizontal rules (---) after headers and session summaries - Consistent spacing throughout all phases - Professional, polished appearance for PR comments Improve comment structure: only nest subsections for pre-flight - Pre-flight: Keeps nested <details> for 3 subsections (Issue/Files/Discussion) - Other phases: Content directly in Review Session (no extra nesting) - Added spacing after Review Session header for better visual appeal - Cleaner, more readable comments for single-content phases Make pr-comment skill self-contained (no state file dependency) - Comments now store extracted state file content internally - No references to state files (which may be deleted) - Nested <details> structure preserves all sections - When state file is deleted, comments remain complete - Supports appending new Review Sessions with full content pr comment skill improvement Post pr comment skill Post pr comment skill - improved
…ture Key improvements: - Check if phase comment exists BEFORE posting (prevents duplicates) - Extract actual content from state file sections instead of simplified summaries - Match state file structure with collapsible <details> sections - Include full tables (Files Changed, Fix Candidates with all columns) - No update mode - each phase gets ONE comment only - Better duplicate detection during recursive calls Fixes issues: - Duplicate Tests comment posted on PR dotnet#27932 - Comments didn't match state file structure (missing subsections) - Fix Candidates table missing columns (Source, Approach, Test Result, etc.) Fix pr-comment script to support stdin and update agent invocation Fix pr-comment invocation in agent instructions - use aggregated format fix: Improve phase status parsing in pr-comment script - Better regex for phase status table parsing - Handles various table formats correctly - Add state file for PR dotnet#27932 review session feat: Replace pr-comment with aggregated single-comment format - Posts ONE comment for entire review (not 5 separate comments) - Minimal vertical space when collapsed - All 5 phases in expandable sections - Updates existing comment as phases complete - Simpler parameter: just Content (no Phase parameter) Add horizontal separators between review sessions in PR comments - Add --- separator when appending new sessions to existing comments - Fix recursive call to use -Content instead of removed -StateFile parameter - Improves visual distinction between multiple review sessions - Makes review history clearer and easier to follow Add horizontal rule separators to PR comments for better visual structure - Replace <br> with --- after phase headers - Add --- after Review Session summary tags - Improves visual separation between sections - Makes comments more readable and structured Remove review session numbering from PR comments Simplify comment format by removing session numbers: - Removed reviewNumber variable and counting logic - Changed header from 'Review Session 1' to just 'Review Session' - Session still expandable with commit link, just no sequential numbering Rationale: - Session numbering adds complexity without clear value - Commit links already provide traceability - Cleaner, simpler format for users Improve PR comment visual spacing and readability Visual improvements for better GitHub rendering: Changes: - Replaced horizontal rules (---) with <br> tags after headers - Added <br> spacing between nested sections in Pre-Flight - Added <br> spacing after Review Session summary in all phases - Added <br> inside nested <details> for breathing room - Consistent spacing between all content blocks Result: - Cleaner, more professional appearance - Better visual hierarchy - Improved readability on GitHub - Less cramped layout Remove all references to external files from pr-comment skill Complete refactoring to make skill truly self-contained: - Removed StateFile parameter entirely - Content parameter now mandatory (single source of truth) - No knowledge of where content comes from - No external file dependencies - Script only cares about: PR number, phase, content - Caller decides where content comes from (agent extracts, manual input, etc.) Documentation updated: - Removed all mentions of external sources - Simplified to: just pass content - No coupling to any particular workflow or file structure Benefits: - Pure function: inputs → output - No hidden dependencies - Works in any context - Easy to understand and maintain Make pr-comment skill state-file-independent Key Changes: - StateFile parameter now OPTIONAL (not mandatory) - Added Content parameter for direct content posting - Comments are self-contained - state file only needed at POST time - Once posted, comments can be updated without state file - Supports both modes: extract from state file OR post direct content Benefits: - State files can be deleted after review without breaking comments - Comments remain complete and readable independently - More flexible usage patterns (manual updates, automated workflows) - No hard dependency on state file persistence Use HTML tags in Review Session header for <summary> compatibility <summary> tags don't support markdown syntax, so use raw HTML: - <strong> for bold text - <a href="..."><code>SHA</code></a> for clickable code-formatted link - Ensures proper rendering in GitHub PR comments Format: 📝 <strong>Review Session 1</strong> — <strong>Title</strong> · <a href="..."><code>abc1234</code></a> Polish Review Session header format with bold title and SHA Format: 📝 **Review Session 1** — **Commit Title** · [`abc1234`](commit-url) - Bold 'Review Session N' - Bold commit title - Middle dot separator (·) - Short SHA in code formatting - SHA is clickable link to full commit - Clean, professional appearance Make commit title clickable in Review Session headers - Fetch both commit message and SHA from GitHub API - Create markdown link: [Commit Title](commit URL) - Users can click to view the commit that triggered the review - Better traceability for multiple review sessions on same PR Polish comment formatting with em dashes and bold status - Phase headers: Use em dash (—) instead of colon - Status values: Bold formatting (**SUCCESS**, **FAILED**, etc.) - Add horizontal rules (---) after headers and session summaries - Consistent spacing throughout all phases - Professional, polished appearance for PR comments Improve comment structure: only nest subsections for pre-flight - Pre-flight: Keeps nested <details> for 3 subsections (Issue/Files/Discussion) - Other phases: Content directly in Review Session (no extra nesting) - Added spacing after Review Session header for better visual appeal - Cleaner, more readable comments for single-content phases Make pr-comment skill self-contained (no state file dependency) - Comments now store extracted state file content internally - No references to state files (which may be deleted) - Nested <details> structure preserves all sections - When state file is deleted, comments remain complete - Supports appending new Review Sessions with full content pr comment skill improvement Post pr comment skill Post pr comment skill - improved
Updated SKILL.md to require posting/updating a collapsible PR comment documenting all try-fix attempts. Added post-try-fix-comment.ps1 PowerShell script to automate creation and updating of a single, double-collapsible comment on PRs, improving reviewer experience and attempt tracking. Post pr comment skill - improved Update pr-finalize skill Improve agent skills and add Android platform instructions - try-fix: Add Step 5.5 for iterating through compile errors (up to 3 times) - try-fix: Add compile-errors.md reference with common patterns - Add android.instructions.md with namespace collision guidance and lifecycle best practices - pr-comment, pr-finalize, learn-from-pr: Various improvements - pr agent: Updates to post-gate phase Update verify-tests-fail-without-fix skill to generate Gate section for PR agent - Generate Gate section markdown to CustomAgentLogsTmp/PRState/verification-report.md - Gate section matches PR agent session format for easy incorporation - Includes test verification results, fix files, and detailed summary - Updated documentation with output file locations Update skills: Make baseline script mandatory in try-fix, use PR-specific output folders - try-fix: Change Step 2 and Step 9 to MANDATORY, emphasize always using EstablishBrokenBaseline.ps1 - try-fix: Add warnings against manual git checkout operations - verify-tests-fail: Update output structure to use PRState/<PRNumber>/verify-tests-fail/ - verify-tests-fail: Add PR number auto-detection from branch name or gh pr view Update try-fix skill with improved structure and validation Update verify-tests-fail.ps1 Improve pr-comment skill: prevent duplicates, mirror state file structure Key improvements: - Check if phase comment exists BEFORE posting (prevents duplicates) - Extract actual content from state file sections instead of simplified summaries - Match state file structure with collapsible <details> sections - Include full tables (Files Changed, Fix Candidates with all columns) - No update mode - each phase gets ONE comment only - Better duplicate detection during recursive calls Fixes issues: - Duplicate Tests comment posted on PR dotnet#27932 - Comments didn't match state file structure (missing subsections) - Fix Candidates table missing columns (Source, Approach, Test Result, etc.) Fix pr-comment script to support stdin and update agent invocation Fix pr-comment invocation in agent instructions - use aggregated format fix: Improve phase status parsing in pr-comment script - Better regex for phase status table parsing - Handles various table formats correctly - Add state file for PR dotnet#27932 review session feat: Replace pr-comment with aggregated single-comment format - Posts ONE comment for entire review (not 5 separate comments) - Minimal vertical space when collapsed - All 5 phases in expandable sections - Updates existing comment as phases complete - Simpler parameter: just Content (no Phase parameter) Add horizontal separators between review sessions in PR comments - Add --- separator when appending new sessions to existing comments - Fix recursive call to use -Content instead of removed -StateFile parameter - Improves visual distinction between multiple review sessions - Makes review history clearer and easier to follow Add horizontal rule separators to PR comments for better visual structure - Replace <br> with --- after phase headers - Add --- after Review Session summary tags - Improves visual separation between sections - Makes comments more readable and structured Remove review session numbering from PR comments Simplify comment format by removing session numbers: - Removed reviewNumber variable and counting logic - Changed header from 'Review Session 1' to just 'Review Session' - Session still expandable with commit link, just no sequential numbering Rationale: - Session numbering adds complexity without clear value - Commit links already provide traceability - Cleaner, simpler format for users Improve PR comment visual spacing and readability Visual improvements for better GitHub rendering: Changes: - Replaced horizontal rules (---) with <br> tags after headers - Added <br> spacing between nested sections in Pre-Flight - Added <br> spacing after Review Session summary in all phases - Added <br> inside nested <details> for breathing room - Consistent spacing between all content blocks Result: - Cleaner, more professional appearance - Better visual hierarchy - Improved readability on GitHub - Less cramped layout Remove all references to external files from pr-comment skill Complete refactoring to make skill truly self-contained: - Removed StateFile parameter entirely - Content parameter now mandatory (single source of truth) - No knowledge of where content comes from - No external file dependencies - Script only cares about: PR number, phase, content - Caller decides where content comes from (agent extracts, manual input, etc.) Documentation updated: - Removed all mentions of external sources - Simplified to: just pass content - No coupling to any particular workflow or file structure Benefits: - Pure function: inputs → output - No hidden dependencies - Works in any context - Easy to understand and maintain Make pr-comment skill state-file-independent Key Changes: - StateFile parameter now OPTIONAL (not mandatory) - Added Content parameter for direct content posting - Comments are self-contained - state file only needed at POST time - Once posted, comments can be updated without state file - Supports both modes: extract from state file OR post direct content Benefits: - State files can be deleted after review without breaking comments - Comments remain complete and readable independently - More flexible usage patterns (manual updates, automated workflows) - No hard dependency on state file persistence Use HTML tags in Review Session header for <summary> compatibility <summary> tags don't support markdown syntax, so use raw HTML: - <strong> for bold text - <a href="..."><code>SHA</code></a> for clickable code-formatted link - Ensures proper rendering in GitHub PR comments Format: 📝 <strong>Review Session 1</strong> — <strong>Title</strong> · <a href="..."><code>abc1234</code></a> Polish Review Session header format with bold title and SHA Format: 📝 **Review Session 1** — **Commit Title** · [`abc1234`](commit-url) - Bold 'Review Session N' - Bold commit title - Middle dot separator (·) - Short SHA in code formatting - SHA is clickable link to full commit - Clean, professional appearance Make commit title clickable in Review Session headers - Fetch both commit message and SHA from GitHub API - Create markdown link: [Commit Title](commit URL) - Users can click to view the commit that triggered the review - Better traceability for multiple review sessions on same PR Polish comment formatting with em dashes and bold status - Phase headers: Use em dash (—) instead of colon - Status values: Bold formatting (**SUCCESS**, **FAILED**, etc.) - Add horizontal rules (---) after headers and session summaries - Consistent spacing throughout all phases - Professional, polished appearance for PR comments Improve comment structure: only nest subsections for pre-flight - Pre-flight: Keeps nested <details> for 3 subsections (Issue/Files/Discussion) - Other phases: Content directly in Review Session (no extra nesting) - Added spacing after Review Session header for better visual appeal - Cleaner, more readable comments for single-content phases Make pr-comment skill self-contained (no state file dependency) - Comments now store extracted state file content internally - No references to state files (which may be deleted) - Nested <details> structure preserves all sections - When state file is deleted, comments remain complete - Supports appending new Review Sessions with full content pr comment skill improvement Post pr comment skill Post pr comment skill - improved
Improves robustness of extracting review sessions from existing comments by introducing a helper function with fallback regex patterns. Dynamically builds phase sections to include only those with content, removing empty phase placeholders and simplifying the comment body structure. post-try-fix-comment Updated SKILL.md to require posting/updating a collapsible PR comment documenting all try-fix attempts. Added post-try-fix-comment.ps1 PowerShell script to automate creation and updating of a single, double-collapsible comment on PRs, improving reviewer experience and attempt tracking. post-try-fix-comment Updated SKILL.md to require posting/updating a collapsible PR comment documenting all try-fix attempts. Added post-try-fix-comment.ps1 PowerShell script to automate creation and updating of a single, double-collapsible comment on PRs, improving reviewer experience and attempt tracking. post-try-fix-comment Updated SKILL.md to require posting/updating a collapsible PR comment documenting all try-fix attempts. Added post-try-fix-comment.ps1 PowerShell script to automate creation and updating of a single, double-collapsible comment on PRs, improving reviewer experience and attempt tracking. Post pr comment skill - improved Update pr-finalize skill Improve agent skills and add Android platform instructions - try-fix: Add Step 5.5 for iterating through compile errors (up to 3 times) - try-fix: Add compile-errors.md reference with common patterns - Add android.instructions.md with namespace collision guidance and lifecycle best practices - pr-comment, pr-finalize, learn-from-pr: Various improvements - pr agent: Updates to post-gate phase Update verify-tests-fail-without-fix skill to generate Gate section for PR agent - Generate Gate section markdown to CustomAgentLogsTmp/PRState/verification-report.md - Gate section matches PR agent session format for easy incorporation - Includes test verification results, fix files, and detailed summary - Updated documentation with output file locations Update skills: Make baseline script mandatory in try-fix, use PR-specific output folders - try-fix: Change Step 2 and Step 9 to MANDATORY, emphasize always using EstablishBrokenBaseline.ps1 - try-fix: Add warnings against manual git checkout operations - verify-tests-fail: Update output structure to use PRState/<PRNumber>/verify-tests-fail/ - verify-tests-fail: Add PR number auto-detection from branch name or gh pr view Update try-fix skill with improved structure and validation Update verify-tests-fail.ps1 Improve pr-comment skill: prevent duplicates, mirror state file structure Key improvements: - Check if phase comment exists BEFORE posting (prevents duplicates) - Extract actual content from state file sections instead of simplified summaries - Match state file structure with collapsible <details> sections - Include full tables (Files Changed, Fix Candidates with all columns) - No update mode - each phase gets ONE comment only - Better duplicate detection during recursive calls Fixes issues: - Duplicate Tests comment posted on PR dotnet#27932 - Comments didn't match state file structure (missing subsections) - Fix Candidates table missing columns (Source, Approach, Test Result, etc.) Fix pr-comment script to support stdin and update agent invocation Fix pr-comment invocation in agent instructions - use aggregated format fix: Improve phase status parsing in pr-comment script - Better regex for phase status table parsing - Handles various table formats correctly - Add state file for PR dotnet#27932 review session feat: Replace pr-comment with aggregated single-comment format - Posts ONE comment for entire review (not 5 separate comments) - Minimal vertical space when collapsed - All 5 phases in expandable sections - Updates existing comment as phases complete - Simpler parameter: just Content (no Phase parameter) Add horizontal separators between review sessions in PR comments - Add --- separator when appending new sessions to existing comments - Fix recursive call to use -Content instead of removed -StateFile parameter - Improves visual distinction between multiple review sessions - Makes review history clearer and easier to follow Add horizontal rule separators to PR comments for better visual structure - Replace <br> with --- after phase headers - Add --- after Review Session summary tags - Improves visual separation between sections - Makes comments more readable and structured Remove review session numbering from PR comments Simplify comment format by removing session numbers: - Removed reviewNumber variable and counting logic - Changed header from 'Review Session 1' to just 'Review Session' - Session still expandable with commit link, just no sequential numbering Rationale: - Session numbering adds complexity without clear value - Commit links already provide traceability - Cleaner, simpler format for users Improve PR comment visual spacing and readability Visual improvements for better GitHub rendering: Changes: - Replaced horizontal rules (---) with <br> tags after headers - Added <br> spacing between nested sections in Pre-Flight - Added <br> spacing after Review Session summary in all phases - Added <br> inside nested <details> for breathing room - Consistent spacing between all content blocks Result: - Cleaner, more professional appearance - Better visual hierarchy - Improved readability on GitHub - Less cramped layout Remove all references to external files from pr-comment skill Complete refactoring to make skill truly self-contained: - Removed StateFile parameter entirely - Content parameter now mandatory (single source of truth) - No knowledge of where content comes from - No external file dependencies - Script only cares about: PR number, phase, content - Caller decides where content comes from (agent extracts, manual input, etc.) Documentation updated: - Removed all mentions of external sources - Simplified to: just pass content - No coupling to any particular workflow or file structure Benefits: - Pure function: inputs → output - No hidden dependencies - Works in any context - Easy to understand and maintain Make pr-comment skill state-file-independent Key Changes: - StateFile parameter now OPTIONAL (not mandatory) - Added Content parameter for direct content posting - Comments are self-contained - state file only needed at POST time - Once posted, comments can be updated without state file - Supports both modes: extract from state file OR post direct content Benefits: - State files can be deleted after review without breaking comments - Comments remain complete and readable independently - More flexible usage patterns (manual updates, automated workflows) - No hard dependency on state file persistence Use HTML tags in Review Session header for <summary> compatibility <summary> tags don't support markdown syntax, so use raw HTML: - <strong> for bold text - <a href="..."><code>SHA</code></a> for clickable code-formatted link - Ensures proper rendering in GitHub PR comments Format: 📝 <strong>Review Session 1</strong> — <strong>Title</strong> · <a href="..."><code>abc1234</code></a> Polish Review Session header format with bold title and SHA Format: 📝 **Review Session 1** — **Commit Title** · [`abc1234`](commit-url) - Bold 'Review Session N' - Bold commit title - Middle dot separator (·) - Short SHA in code formatting - SHA is clickable link to full commit - Clean, professional appearance Make commit title clickable in Review Session headers - Fetch both commit message and SHA from GitHub API - Create markdown link: [Commit Title](commit URL) - Users can click to view the commit that triggered the review - Better traceability for multiple review sessions on same PR Polish comment formatting with em dashes and bold status - Phase headers: Use em dash (—) instead of colon - Status values: Bold formatting (**SUCCESS**, **FAILED**, etc.) - Add horizontal rules (---) after headers and session summaries - Consistent spacing throughout all phases - Professional, polished appearance for PR comments Improve comment structure: only nest subsections for pre-flight - Pre-flight: Keeps nested <details> for 3 subsections (Issue/Files/Discussion) - Other phases: Content directly in Review Session (no extra nesting) - Added spacing after Review Session header for better visual appeal - Cleaner, more readable comments for single-content phases Make pr-comment skill self-contained (no state file dependency) - Comments now store extracted state file content internally - No references to state files (which may be deleted) - Nested <details> structure preserves all sections - When state file is deleted, comments remain complete - Supports appending new Review Sessions with full content pr comment skill improvement Post pr comment skill Post pr comment skill - improved Refactor try-fix comment script and update documentation Updated the post-try-fix-comment.ps1 script to support posting to issues (not just PRs), improved the comment format to use single-level collapsible sections per attempt, and added a recommendation section. The script now handles updating or creating comments more robustly, and the SKILL.md documentation was revised to reflect the new usage and comment structure. Add script to post or update write-tests issue comment Introduces a PowerShell script to post or update a standardized comment documenting UI tests on a GitHub issue or pull request. Updates SKILL.md with instructions for previewing and posting the comment, including guidance on verification status and comment behavior.
5fa10ac to
6e519b5
Compare
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 27932Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 27932" |
🤖 AI Summary📊 Expand Full Review🔍 Pre-Flight — Context & Validation📝 Review Session — Test fix ·
|
| File | Issue | Status |
|---|---|---|
Issue27999.cs (NUnit) |
Duplicate [Category] attribute |
|
Issue27999.cs (NUnit) |
Typo in method name: "ShouldBeCalles" → "ShouldBeCalled" | |
Issue27800.cs (NUnit) |
Was failing on Android/Mac/Windows (not iOS-scoped) | ✅ Fixed by author |
Issue27999.cs / Issue27800.cs |
Filename mismatch: 27999 should be 27799 |
PR Discussion Summary
- @jsuarezruiz: Triggered Azure Pipelines runs
- @rmarinho: Triggered rebase
- @jsuarezruiz: Flagged that
Issue27800.cstest was failing on Android/Mac/Windows - @kubaflo: Fixed by scoping to iOS only
Fix Candidates Table
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #27932 | Manual completion tasks + BackAction override after More tab push/pop | ✅ PASS (Gate) | ShellSectionRenderer.cs (+24 -3) |
Original PR |
🚦 Gate — Test Verification
📝 Review Session — Test fix · 6e519b5
Result: ✅ PASSED
Platform: iOS (simulator)
Mode: Full Verification (imported from prior agent run)
- Tests FAIL without fix ✅ (bug reproduced - Issue27799: OnNavigatedTo count was 0 instead of 3; Issue27800: count was 1 instead of 2)
- Tests PASS with fix ✅ (fix validated - both tests passed)
Test Filter: Issue27800|Issue27799
Tests: 2/2 FAILED without fix, 2/2 PASSED with fix
Conclusion: Tests correctly detect the issue and validate the fix works.
🔧 Fix — Analysis & Comparison
📝 Review Session — Test fix · 6e519b5
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| 1 | try-fix (sonnet) | MoreTabNavDelegate on MoreNavigationController.Delegate | ✅ PASS | ShellSectionRenderer.cs (+47) |
Intercepts DidShowViewController after animation; PR warns iOS may override delegate |
| 2 | try-fix (opus) | CATransaction.CompletionBlock wrapping push/pop | ✅ PASS | ShellSectionRenderer.cs (+28) |
Post-animation timing via Core Animation; clean 1-file approach |
| 3 | try-fix (gpt-5.2) | TransitionCoordinator + NavigationBarDelegateProxy | ❌ FAIL | ShellSectionRenderer.cs |
App got stuck, back button "Go Back" element never appeared |
| 4 | try-fix (gpt-5.3-codex) | DispatchQueue.MainQueue.DispatchAsync deferred completion | ❌ FAIL | ShellSectionRenderer.cs |
OnNavigatedTo stayed at 1 (expected 2); timing insufficient |
| 5 | try-fix (opus round 2) | Forward from existing ShellItemRenderer.DidShowViewController WeakDelegate to ShellSectionRenderer.HandleMoreNavigationCompletionTasks | ✅ PASS | ShellItemRenderer.cs (+10), ShellSectionRenderer.cs (+34) |
Uses EXISTING WeakDelegate hookup (line 82); post-animation timing matches normal navigation |
| 6 | try-fix (gpt-5.2 round 2) | UIView containment hook (MoreNavigationCompletionHookView with MovedToSuperview/MovedToWindow) | ✅ PASS | ShellSectionRenderer.cs (+118/-8) |
Novel approach bypasses delegate entirely; complex implementation |
| PR | PR #27932 | Manual HandleMoreNavigationCompletionTasks() + BackAction on pushed VCs + optional topViewController on SendPop() | ✅ PASS (Gate) | ShellSectionRenderer.cs (+24/-3) |
Simplest, synchronous completion, well-documented reasoning |
Cross-Pollination Summary
| Round | Model | Response |
|---|---|---|
| 1 | claude-sonnet-4.6 | NEW IDEA: viewDidAppear hook on pushed VCs |
| 1 | claude-opus-4.6 | NEW IDEA: ShellItemRenderer.DidShowViewController forwarding → ran as Attempt 5 |
| 1 | gpt-5.2 | NEW IDEA: NSNotificationCenter |
| 1 | gpt-5.3-codex | NEW IDEA: KVO on MoreNavigationController.ViewControllers |
| 1 | gemini-3-pro-preview | BLOCKED (no response after 2 retries) |
| 2 | claude-sonnet-4.6 | NEW IDEA: UINavigationBar didPush/didPop callbacks |
| 2 | claude-opus-4.6 | NO NEW IDEAS |
| 2 | gpt-5.2 | NEW IDEA: WillMoveToParentViewController/DidMoveToParentViewController → ran as Attempt 6 |
| 2 | gpt-5.3-codex | NEW IDEA: Delegate multiplexer/swizzle |
| 3 | claude-sonnet-4.6 | NEW IDEA: beginAppearanceTransition/endAppearanceTransition |
| 3 | claude-opus-4.6 | NO NEW IDEAS |
| 3 | gpt-5.2 | NEW IDEA: ViewDidAppear/ViewDidDisappear hooks |
| 3 | gpt-5.3-codex | NO NEW IDEAS |
Exhausted: No (reached max 3 rounds; gemini blocked; 2/4 responding models still had ideas)
Selected Fix: PR's fix
Reasoning: The PR's fix (+24/-3 lines in 1 file) is the simplest passing candidate and its reasoning is well-documented in the PR description. Three independent approaches also pass (Attempts 1, 2, 5, 6), which strongly validates the fix is correct.
Strongest alternative: Attempt 5 (ShellItemRenderer.DidShowViewController forwarding) is architecturally cleaner — it uses the existing WeakDelegate hookup at line 82 of ShellItemRenderer.cs and achieves proper post-animation timing matching normal navigation. However, it requires changes in 2 files.
Why not Attempt 1: The PR explicitly warns "Don't try to set a delegate on MoreNavigationController - it's managed by iOS and delegate changes may be overridden." Although it passed tests, the reliability concern is valid.
Why not Attempt 2 or 6: Both pass but are more complex than the PR's direct approach.
Conclusion: PR's fix is simple, direct, well-documented, and validated. APPROVE.
📋 Report — Final Recommendation
📝 Review Session — Test fix · 6e519b5
PR #27932 - Agent Review Report
Summary
PR: [iOS][Shell] Fix navigation lifecycle and back button for More tab (>5 tabs)
Author: @kubaflo
Fixes: #27799, #27800, #27801, #27802
Recommendation: ✅ APPROVE WITH MINOR FIXES
The core fix is correct and well-implemented. Tests pass on iOS. Several test file quality issues should be addressed before merge.
Phase 1: Pre-Flight ✅
Issue Summary:
#27799/#27800: OnAppearing, OnNavigatedTo not firing; BackButtonBehavior broken for Shell pages in "More" tab (>5 tabs, iOS only)- Root cause: When
IsInMoreTab, iOS usesUITabBarController.MoreNavigationControllerinstead of ourShellSectionRenderernavigation controller. OurNavDelegate.DidShowViewControllernever fires, leaving_completionTasksentries pending forever, blocking lifecycle events and navigation.
PR Discussion:
- @jsuarezruiz flagged Android test failures → author fixed to
#if IOSscope ✅ - Inline Copilot comments flagged: duplicate [Category], method name typo, filename mismatch → not yet addressed
Phase 2: Gate ✅ PASSED (iOS)
Tests verified without fix (FAILING):
- Issue27799:
OnNavigatedTo: 0(expected 3) — events blocked by pending completion tasks - Issue27800:
OnNavigatedTo: 1(expected 2) — back button navigation hung
Tests verified with PR fix (PASSING):
- Issue27799:
OnNavigatedTo: 3,OnAppearing: 3✅ - Issue27800:
OnNavigatedTo: 2,OnAppearing: 2✅
Phase 3: Fix Exploration
6 alternative approaches explored across 4 models:
| Attempt | Model | Approach | Result |
|---|---|---|---|
| 1 | claude-sonnet-4.6 | MoreTabNavDelegate on MoreNavigationController.Delegate | ✅ PASS |
| 2 | claude-opus-4.6 | CATransaction.CompletionBlock after push/pop | ✅ PASS |
| 3 | gpt-5.2 | TransitionCoordinator + NavigationBarDelegateProxy | ❌ FAIL (app stuck) |
| 4 | gpt-5.3-codex | DispatchQueue.MainQueue.DispatchAsync | ❌ FAIL (OnNavigatedTo=1) |
| 5 | claude-opus-4.6 (R2) | Forward from ShellItemRenderer.DidShowViewController | ✅ PASS |
| 6 | gpt-5.2 (R2) | UIView containment hook (MovedToSuperview) | ✅ PASS |
Selected: PR's own fix — synchronous HandleMoreNavigationCompletionTasks() called after push/pop. Simplest (+24 lines in 1 file), no delegate manipulation, well-documented.
Notable architectural insight: ShellItemRenderer already sets MoreNavigationController.WeakDelegate = this, and DidShowViewController IS called for MoreNavController — but it doesn't forward completion to ShellSectionRenderer._completionTasks. Alternative Attempt 5 leverages this existing hookup.
Warning documented in PR: Don't set a delegate on MoreNavigationController — managed by iOS, may be overridden (disqualifies Attempt 1 for robustness).
Phase 4: Code Review (pr-finalize)
Title ✅
"[iOS][Shell] Fix navigation lifecycle and back button for More tab (>5 tabs)" — excellent, no change needed.
Description ✅
Good quality. Has NOTE block, root cause, 3-part fix description, key insight, "what to avoid" section, all 4 issue links, video demo. No rewrite needed.
Code Review Issues
🟡 1. Static counters cause test flakiness (Issue27999.cs HostApp)
// Current (buggy - persists across test runs):
private static int _onNavigatedToCount = 0;
private static int _onAppearingCount = 0;
// Fix:
private int _onNavigatedToCount = 0;
private int _onAppearingCount = 0;The test verifies exact counts (3, 3). Static fields accumulate across runs → test fails on second execution.
🟡 2. Filename/class mismatch (both Issue27999.cs files)
TestCases.HostApp/Issues/Issue27999.cs→ class isIssue27799→ rename toIssue27799.csTestCases.Shared.Tests/Tests/Issues/Issue27999.cs→ class isIssue27799→ rename toIssue27799.cs
🟡 3. Overly broad #if guard in Issue27800.cs HostApp
// Current:
#if ANDROID || IOS
// Fix:
#if IOSPlatformAffected.iOS and the NUnit test both correctly scope to iOS. HostApp should match.
🟡 4. Duplicate [Category] attribute in Issue27999.cs NUnit test
Two [Category(UITestCategories.Shell)] attributes on the same test method — remove one per guidelines.
🟡 5. Method name typo in Issue27999.cs NUnit test
OnAppearingAndOnNavigatedToShouldBeCalles → OnAppearingAndOnNavigatedToShouldBeCalled
🟡 6. Missing newline at end of all 4 test files
What Looks Good ✅
HandleMoreNavigationCompletionTasks()is well-named, properlyprivate, correctly handles both_completionTasksand_popCompletionTaskfallbackSendPop(UIViewController topViewController = null)maintains backward compatibilityBackActionclosure correctly evaluatesTopViewControllerat invocation time (not capture time)- The "don't set delegate on MoreNavigationController" warning is documented in PR description
Final Recommendation
✅ APPROVE WITH MINOR FIXES
The fix is architecturally sound, gate-verified on iOS, and has multiple validated alternatives as evidence the approach is correct. Issues found are all in test files, not the production fix. Key items to address:
- Rename
Issue27999.cs→Issue27799.csin both projects (naming convention) - Make static counters instance fields (test reliability)
- Fix
#ifguard, duplicate category, method name typo
📋 Expand PR Finalization Review
Title: ✅ Good
Current: [iOS][Shell] Fix navigation lifecycle and back button for More tab (>5 tabs)
Description: ✅ Good
Description needs updates. See details below.
Code Review: ⚠️ Issues Found
Code Review — PR #27932
PR: [iOS][Shell] Fix navigation lifecycle and back button for More tab (>5 tabs)
🔴 Critical Issues
File Naming Mismatch in Both Test Projects
- Files:
src/Controls/tests/TestCases.HostApp/Issues/Issue27999.csandsrc/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue27999.cs - Problem: Both files are named
Issue27999.csbut contain the classIssue27799(and[Issue(... 27799, ...)]attribute). They fix issue OnAppearing and OnNavigatedTo does not work when using extended Tabbar (tabbar with more than 5 tabs) on IOS. #27799, not a nonexistent [iOS] Wrong TimePicker black bar #27999. Test infrastructure, CI categorization, and developer lookup all rely on file names matching the issue number they test. - Recommendation: Rename both files to
Issue27799.cs.
🟡 Medium Suggestions
#if ANDROID || IOS Guard Should Be #if IOS
- File:
src/Controls/tests/TestCases.HostApp/Issues/Issue27800.cs - Problem: The file wraps the entire class in
#if ANDROID || IOS, but the More tab (>5 tabs) feature is iOS-only. The[Issue(... PlatformAffected.iOS)]attribute already documents this. Android doesn't have theMoreNavigationControllerconcept at all — including Android in the compilation guard is misleading and could confuse future readers into thinking there's Android relevance. - Note: The corresponding SharedTests file correctly uses
#if IOSonly. - Recommendation: Change
#if ANDROID || IOSto#if IOS.
Static Counter Fields Cause Test Isolation Risk
- File:
src/Controls/tests/TestCases.HostApp/Issues/Issue27999.cs - Problem:
_onNavigatedToCountand_onAppearingCountareprivate static intfields on the outerIssue27799class, shared by the innerTab2,Tab6, andTab6Subpageclasses. This is intentional (to count total lifecycle events across all inner pages), butstaticmeans the counts persist across test runs within the same process. The NUnit test asserts exact counts (OnNavigatedTo: 3,OnAppearing: 3). On a second run (e.g., test retry, parallel execution), the counts would be 6, 6 and the test would fail. - Recommendation: Reset the static counters in
Issue27799.Init()(e.g.,_onNavigatedToCount = 0; _onAppearingCount = 0;), or make them instance fields and adjust the design so Tab2 can observe the cumulative count.
Test Method Indentation in SharedTests Files
-
Files:
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue27800.csandIssue27999.cs -
Problem: The
[Test],[Category], and method declarations are unindented (at column 0) instead of being indented at the class level. While this compiles, it's inconsistent with all other test files in the project.// Current (wrong) [Test] [Category(UITestCategories.Shell)] public void ShellBackButtonBehaviorShouldWorkWithMoreTab() { // Expected (correct) [Test] [Category(UITestCategories.Shell)] public void ShellBackButtonBehaviorShouldWorkWithMoreTab() {
-
Recommendation: Fix indentation to match class-level indentation (2 tabs).
Missing EOF Newline
- Files: All 4 new test files end with
\ No newline at end of file. - Impact: Minor — causes noisy diffs in some tools and violates the repository's standard formatting.
- Recommendation: Add a trailing newline to all 4 files.
✅ Looks Good
Core Fix Logic in ShellSectionRenderer.cs
HandleMoreNavigationCompletionTasks()is correctly scoped (private), well-named, and follows the existing completion task pattern. The fallback to_popCompletionTaskcorrectly handles the pop case (the popped view controller won't be in_completionTasks, so the else-branch handles it).SendPop(UIViewController topViewController = null)optional parameter correctly defaults toTopViewControllerfor all existing call sites, maintaining full backward compatibility.BackActionclosure correctly evaluatestabBarController.MoreNavigationController.TopViewControllerat call time (not capture time), since it's inside a lambda that runs when the back button is tapped.- Not setting a delegate on
MoreNavigationController— the PR description correctly calls out why this is the right approach (iOS manages that controller's delegate and will override it).
Test Coverage
- Two tests covering two distinct failure modes: lifecycle events (
OnAppearing/OnNavigatedTo) andBackButtonBehavior. Good coverage of the reported issues. - Tests correctly gate with
#if IOSin SharedTests since More tab is iOS-specific.
|
Does it also fix the same issue while not using Shell? Because I'm not using shell and I have the same issue so I'm wondering if this would fix it. |
Rename test files from Issue27999.cs to Issue27799.cs in both TestCases.HostApp and TestCases.Shared.Tests to correct the issue number and align test filenames with the intended issue. No code changes beyond the filename updates.
…5 tabs) (dotnet#27932) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Description of Change Fixes navigation lifecycle events (`OnAppearing`, `OnNavigatedTo`) and back button behavior for Shell pages accessed through the "More" tab (when TabBar has >5 tabs on iOS). **Root cause:** When `IsInMoreTab` is true, `PushViewController` and `PopViewController` delegate to `UITabBarController.MoreNavigationController` instead of the base navigation controller. The `MoreNavigationController` doesn't use our `NavDelegate`, so `DidShowViewController` never fires, leaving navigation completion tasks incomplete. This causes lifecycle events to not fire and back button bindings to fail. **Fix:** 1. **Completion tasks:** Added `HandleMoreNavigationCompletionTasks()` helper method that manually completes navigation tasks after More push/pop operations 2. **Back button:** Set `BackAction` on pushed view controllers to call `SendPop()` with the correct top view controller 3. **API cleanup:** Modified `SendPop()` to accept optional `topViewController` parameter (defaults to `TopViewController` for backward compatibility) **Key insight:** MoreNavigationController is a separate UINavigationController that doesn't inherit our delegate setup. Tasks were being added to `_completionTasks` dictionary but never completed because the delegate callback that completes them (`DidShowViewController`) only fires for the base navigation controller. **What to avoid:** Don't try to set a delegate on `MoreNavigationController` - it's managed by iOS and delegate changes may be overridden. The manual completion approach after each operation is more reliable. ### Issues Fixed Fixes dotnet#27799 Fixes dotnet#27800 Fixes dotnet#30862 Fixes dotnet#31166 |Before|After| |--|--| |<video src="https://github.com/user-attachments/assets/08d993d7-25ad-4e12-bb80-e7c8162cf79e" width="300px"/>|<video src="https://github.com/user-attachments/assets/e07b53c3-c403-4e2b-a59d-e779e7c8274e" width="300px"/>|
…5 tabs) (#27932) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Description of Change Fixes navigation lifecycle events (`OnAppearing`, `OnNavigatedTo`) and back button behavior for Shell pages accessed through the "More" tab (when TabBar has >5 tabs on iOS). **Root cause:** When `IsInMoreTab` is true, `PushViewController` and `PopViewController` delegate to `UITabBarController.MoreNavigationController` instead of the base navigation controller. The `MoreNavigationController` doesn't use our `NavDelegate`, so `DidShowViewController` never fires, leaving navigation completion tasks incomplete. This causes lifecycle events to not fire and back button bindings to fail. **Fix:** 1. **Completion tasks:** Added `HandleMoreNavigationCompletionTasks()` helper method that manually completes navigation tasks after More push/pop operations 2. **Back button:** Set `BackAction` on pushed view controllers to call `SendPop()` with the correct top view controller 3. **API cleanup:** Modified `SendPop()` to accept optional `topViewController` parameter (defaults to `TopViewController` for backward compatibility) **Key insight:** MoreNavigationController is a separate UINavigationController that doesn't inherit our delegate setup. Tasks were being added to `_completionTasks` dictionary but never completed because the delegate callback that completes them (`DidShowViewController`) only fires for the base navigation controller. **What to avoid:** Don't try to set a delegate on `MoreNavigationController` - it's managed by iOS and delegate changes may be overridden. The manual completion approach after each operation is more reliable. ### Issues Fixed Fixes #27799 Fixes #27800 Fixes #30862 Fixes #31166 |Before|After| |--|--| |<video src="https://github.com/user-attachments/assets/08d993d7-25ad-4e12-bb80-e7c8162cf79e" width="300px"/>|<video src="https://github.com/user-attachments/assets/e07b53c3-c403-4e2b-a59d-e779e7c8274e" width="300px"/>|
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Description of Change
Fixes navigation lifecycle events (
OnAppearing,OnNavigatedTo) and back button behavior for Shell pages accessed through the "More" tab (when TabBar has >5 tabs on iOS).Root cause: When
IsInMoreTabis true,PushViewControllerandPopViewControllerdelegate toUITabBarController.MoreNavigationControllerinstead of the base navigation controller. TheMoreNavigationControllerdoesn't use ourNavDelegate, soDidShowViewControllernever fires, leaving navigation completion tasks incomplete. This causes lifecycle events to not fire and back button bindings to fail.Fix:
HandleMoreNavigationCompletionTasks()helper method that manually completes navigation tasks after More push/pop operationsBackActionon pushed view controllers to callSendPop()with the correct top view controllerSendPop()to accept optionaltopViewControllerparameter (defaults toTopViewControllerfor backward compatibility)Key insight: MoreNavigationController is a separate UINavigationController that doesn't inherit our delegate setup. Tasks were being added to
_completionTasksdictionary but never completed because the delegate callback that completes them (DidShowViewController) only fires for the base navigation controller.What to avoid: Don't try to set a delegate on
MoreNavigationController- it's managed by iOS and delegate changes may be overridden. The manual completion approach after each operation is more reliable.Issues Fixed
Fixes #27799
Fixes #27800
Fixes #30862
Fixes #31166
Screen.Recording.2025-02-17.at.20.30.39.mov
Screen.Recording.2025-02-17.at.20.27.08.mov