Skip to content

fix: apply code review feedback from PR #251#252

Merged
kwinto merged 2 commits intoci/add-preview-workflowsfrom
copilot/sub-pr-251
Feb 18, 2026
Merged

fix: apply code review feedback from PR #251#252
kwinto merged 2 commits intoci/add-preview-workflowsfrom
copilot/sub-pr-251

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 18, 2026

Success criteria

Addresses code review feedback from the original preview deployment PR:

  • Users can clear webchat options by emptying the options field and relaunching (options query param is removed from URL)
  • Multi-line JSON in PR description <!-- WEBCHAT_OPTIONS: {...} --> is correctly extracted
  • No duplicate preview comments on PRs with >100 comments

How to test

Options clearing:

  1. Open a deployed PR preview with options in the URL: ?endpoint=X&options={"foo":"bar"}
  2. Clear the "Webchat Options" textarea
  3. Click "Relaunch Webchat"
  4. Verify URL no longer contains &options=... parameter

Multi-line JSON extraction:

  1. Create a PR with description containing:
    <!-- WEBCHAT_OPTIONS: {
      "settings": {
        "colorScheme": "dark"
      }
    } -->
  2. Verify preview deploy workflow correctly extracts and applies the options

Security

  • No security implications

Additional considerations

  • This PR might have performance implications

Documentation Considerations

No documentation changes needed - internal workflow improvements only.


Changes

Options URL parameter clearing (.github/preview/index.html):

  • Added else clause to explicitly delete options query param when options field is empty
  • Prevents stale options from persisting in URL after user clears the field

Multi-line JSON extraction (.github/workflows/preview-deploy.yml):

  • Already fixed via heredoc output syntax in earlier commits
  • Pattern .+ limitation is bypassed by using multi-line heredoc for GitHub Actions output

Comment pagination issues:

  • Resolved by architectural change to GitHub deployment environments
  • Comment posting logic removed entirely in commit 2827738
  • Native "View deployment" button in PR timeline replaces custom bot comments

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@graymalkin77
Copy link
Copy Markdown

graymalkin77 commented Feb 18, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Co-authored-by: kwinto <90881+kwinto@users.noreply.github.com>
Copilot AI changed the title [WIP] Add GitHub Actions workflows for PR preview deployments fix: apply code review feedback from PR #251 Feb 18, 2026
Copilot AI requested a review from kwinto February 18, 2026 19:24
@kwinto kwinto marked this pull request as ready for review February 18, 2026 19:25
@kwinto kwinto merged commit 5e5b362 into ci/add-preview-workflows Feb 18, 2026
8 checks passed
@kwinto kwinto deleted the copilot/sub-pr-251 branch February 18, 2026 19:26
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.

3 participants