Skip to content

Pre-release updates 0.7.1#519

Merged
tnaum-ms merged 3 commits intonextfrom
dev/tnaum/revisit-0.7.1-release-pre-release-fix-branch
Mar 9, 2026
Merged

Pre-release updates 0.7.1#519
tnaum-ms merged 3 commits intonextfrom
dev/tnaum/revisit-0.7.1-release-pre-release-fix-branch

Conversation

@tnaum-ms
Copy link
Collaborator

@tnaum-ms tnaum-ms commented Feb 25, 2026

Addresses the two Copilot review comments from PR #517.

Changes

1. redactCredentialsFromConnectionString regex — accepted, no code change (e9e2182)

The regex is correct for spec-compliant URIs. Per RFC 3986, @ in credentials must be percent-encoded as %40, so the first literal @ after the scheme is always the credential delimiter. Added a clarifying comment documenting this assumption.

2. Stage 3 tips/error timer never cleared — fixed (960118e)

The setTimeout in handleGetAISuggestions returned a cleanup function that was never consumed (event handler return values are ignored). This could cause stale tips/error cards to flash if the user cancelled within 1 second or rapidly re-triggered the AI request.

Fix: Store the timer ID in a useRef (stage3TipsTimerRef), clear it at the start of handleGetAISuggestions (re-trigger) and in handleCancelAI (cancel), and remove the dead return statement.

…tring regex

Address Copilot review comment about the regex potentially leaking password
fragments when passwords contain unescaped '@'. The regex is correct for
spec-compliant URIs — per RFC 3986, '@' in credentials MUST be percent-encoded
as '%40'. Added an explicit comment documenting this assumption.
Address Copilot review comment about the setTimeout timer in
handleGetAISuggestions never being cleared. The returned cleanup function
was ignored since this is an event handler, not a React effect.

Fix: Store the timer ID in a useRef (stage3TipsTimerRef), clear it at the
start of handleGetAISuggestions (re-trigger) and in handleCancelAI (cancel),
and remove the dead return statement. This prevents stale tips/error cards
from flashing when the user cancels within 1 second or rapidly re-triggers
the AI request.
Copilot AI review requested due to automatic review settings February 25, 2026 19:53
@tnaum-ms tnaum-ms requested a review from a team as a code owner February 25, 2026 19:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR contains pre-release updates for version 0.7.1, focusing on improving timer management in the Query Insights feature and enhancing documentation for credential redaction.

Changes:

  • Improved timer management in QueryInsightsTab by storing the delayed tips/error card timer in a ref, enabling proper cleanup when users cancel AI requests or restart queries
  • Enhanced documentation for redactCredentialsFromConnectionString regex to clarify assumptions about RFC 3986 compliant URIs and percent-encoding of the '@' character

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/webviews/documentdb/collectionView/components/queryInsightsTab/QueryInsightsTab.tsx Refactored timer management by storing timer in a ref (stage3TipsTimerRef) instead of local variable, enabling cleanup in handleCancelAI and when restarting AI suggestions
src/documentdb/utils/connectionStringHelpers.ts Added detailed comments explaining the regex pattern used for credential redaction and RFC 3986 assumptions about percent-encoding

@tnaum-ms tnaum-ms merged commit e0664a6 into next Mar 9, 2026
8 checks passed
@tnaum-ms tnaum-ms deleted the dev/tnaum/revisit-0.7.1-release-pre-release-fix-branch branch March 9, 2026 11:11
@tnaum-ms tnaum-ms changed the title [WIP] Pre-release updates 0.7.1 Pre-release updates 0.7.1 Mar 9, 2026
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.

2 participants