Skip to content

Conversation

@hornm-knime
Copy link
Contributor

... for a space item.

NXT-4251 ('Reveal in explorer' after component sharing in browser does not work)

@hornm-knime hornm-knime requested a review from a team as a code owner December 19, 2025 13:06
Copilot AI review requested due to automatic review settings December 19, 2025 13:06
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

This PR adds a new endpoint to retrieve ancestor information for a space item, addressing an issue where "Reveal in explorer" functionality was not working correctly after component sharing in the browser. The implementation includes handling for potentially outdated project names by returning the current item name and providing informative error messages when the item may have been deleted remotely.

Key Changes:

  • Added getAncestorInfo method to retrieve ancestor item IDs and current item name
  • Implemented error handling with context-aware messages for remote item changes or deletions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

final var itemName = space.getItemName(itemId);
return builder(AncestorInfoEntBuilder.class).setItemName(itemName).setAncestorItemIds(ancestorItemIds)
.build();
} catch (MutableServiceCallException e) { // NOSONAR
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

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

The NOSONAR comment suppresses warnings but lacks explanation. Add a brief comment explaining why this exception handling pattern is intentional, such as why the exception is caught and rethrown with additional context.

Copilot uses AI. Check for mistakes.
final var projectName = m_projectManager //
.getProject(providerId, spaceId, itemId) //
.map(Project::getName) //
.orElse("the project");
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

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

The fallback error message 'the project' is vague when the project name cannot be determined. Consider using a more descriptive fallback like 'the requested project' or 'project (unknown name)' to make it clearer to users that the specific project name is unavailable.

Suggested change
.orElse("the project");
.orElse("project (unknown name)");

Copilot uses AI. Check for mistakes.
... for a space item.

NXT-4251 ('Reveal in explorer' after component sharing in browser does not work)
@hornm-knime hornm-knime force-pushed the bug/NXT-4251-reveal-in-explorer-after-compon branch from 7e68182 to e851f70 Compare December 19, 2025 17:47
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 85%)

See analysis details on SonarQube Cloud

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