Skip to content

Conversation

@jasonleenaylor
Copy link
Contributor

@jasonleenaylor jasonleenaylor commented Oct 14, 2025

This change is Reviewable

Copilot AI review requested due to automatic review settings October 14, 2025 23:53
Copy link

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

Fixes a user interface issue where new 'common' columns in XML browse views were not being displayed by default. The changes ensure that when loading column configurations, any new common columns that weren't previously saved are automatically added to the visible columns list.

  • Tracks which possible columns are new (not in saved configuration)
  • Automatically shows new columns marked as 'common' by default

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

foreach (XmlNode node in doc.DocumentElement.SelectNodes("//column"))
{
// if there is a corresponding possible column remove it from the newPossibleColumns list.
var possible = newPossibleColumns.Find(n => n.Attributes?["label"].Value == node.Attributes?["label"].Value);
Copy link

Copilot AI Oct 14, 2025

Choose a reason for hiding this comment

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

Potential NullReferenceException if node.Attributes is null. The null-conditional operator protects against node.Attributes being null, but not against node.Attributes["label"] returning null when the "label" attribute doesn't exist.

Suggested change
var possible = newPossibleColumns.Find(n => n.Attributes?["label"].Value == node.Attributes?["label"].Value);
var possible = newPossibleColumns.Find(n =>
n.Attributes != null &&
n.Attributes["label"] != null &&
node.Attributes != null &&
node.Attributes["label"] != null &&
n.Attributes["label"].Value == node.Attributes["label"].Value);

Copilot uses AI. Check for mistakes.
var newPossibleColumns = new List<XmlNode>(m_possibleColumns);
foreach (XmlNode node in doc.DocumentElement.SelectNodes("//column"))
{
// if there is a corresponding possible column remove it from the newPossibleColumns list.
Copy link

Copilot AI Oct 14, 2025

Choose a reason for hiding this comment

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

Missing comma in comment. Should be 'If there is a corresponding possible column, remove it from the newPossibleColumns list.'

Suggested change
// if there is a corresponding possible column remove it from the newPossibleColumns list.
// if there is a corresponding possible column, remove it from the newPossibleColumns list.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@aror92 aror92 left a comment

Choose a reason for hiding this comment

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

:lgtm:

@aror92 reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @jasonleenaylor)

@jasonleenaylor jasonleenaylor merged commit 8df2ecb into release/9.3 Oct 15, 2025
5 checks passed
@jasonleenaylor jasonleenaylor deleted the bugfix/LT-22265 branch October 15, 2025 18:01
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