[Pages] Flag server logic with-pattern issues - #129
Merged
Priyanshu Agrawal (priyanshu92) merged 2 commits intoApr 28, 2026
Merged
Conversation
Priyanshu Agrawal (priyanshu92)
commented
Apr 28, 2026
Collaborator
- Detect raw with( substrings before server-side validation fails at runtime
- Document OData startswith/endswith literal splitting workaround
- Add tests for rejected and accepted startswith patterns
- Detect raw with( substrings before server-side validation fails at runtime - Document OData startswith/endswith literal splitting workaround - Add tests for rejected and accepted startswith patterns Co-authored-by: GPT-5.5 <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Priyanshu Agrawal (priyanshu92)
April 28, 2026 14:31
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Adds proactive validation and documentation to prevent Power Pages Server Logic runtime failures caused by the platform’s prohibited with\s*\( pattern matching (including within OData function literals like startswith(), plus tests to lock in the behavior.
Changes:
- Add raw-source scanning in server logic validator to flag
with\s*\(occurrences (including inside string literals) with line reporting. - Document the prohibited-pattern caveat and the OData literal-splitting workaround; add a troubleshooting section for decoding
X-Ms-UserTrace. - Add unit tests that confirm
startswith(is rejected and the split-literal workaround passes.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| plugins/power-pages/skills/add-server-logic/scripts/validate-serverlogic.js | Adds a new validation rule to detect with\s*\( in raw source and emit actionable errors with line numbers. |
| plugins/power-pages/skills/add-server-logic/SKILL.md | Documents prohibited script patterns, workaround for OData startswith(/endswith(, and adds runtime troubleshooting guidance. |
| plugins/power-pages/scripts/tests/validate-serverlogic.test.js | Adds tests covering both the failing startswith( literal and the passing split-literal workaround. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- 📝 Clarified the diagnostic log retrieval process. - 🔄 Removed specific references to the Power Pages design studio diagnostics view. - 🔍 Updated instructions for using Playwright MCP tools. - ❌ Removed unnecessary steps and streamlined the troubleshooting flow. -Priyanshu
Priyanshu Agrawal (priyanshu92)
enabled auto-merge (squash)
April 28, 2026 14:39
Copilot started reviewing on behalf of
Priyanshu Agrawal (priyanshu92)
April 28, 2026 14:40
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Suyash Kumar Patel (suyash1208)
approved these changes
Apr 28, 2026
Priyanshu Agrawal (priyanshu92)
deleted the
users/priyanshuag/serverlogic-with-pattern-validation
branch
April 28, 2026 15:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.