Skip to content

Conversation

@Elodie-DeMatteis-Upf
Copy link
Contributor

@Elodie-DeMatteis-Upf Elodie-DeMatteis-Upf commented Jan 8, 2026

What does this PR do?

Related to: #

What are the observable changes?

Good PR checklist

  • Title makes sense
  • Is against the correct branch
  • Only addresses one issue
  • Properly assigned
  • Added/updated tests
  • Added/updated documentation
  • Migrated touched components to Glimmer Components
  • Properly labeled

Note

Medium Risk
Moderate risk: changes affect navigation/active-state behavior in LinkTo plus sidebar expand/collapse UX, which could alter routing and visual state across the app; covered by updated integration tests.

Overview
Improves OSS::Anchor to better support app/engine routing by adding optional routePrefix handling for internal route detection and wiring @current-when via a new disableAutoActive flag to control Ember’s automatic active class.

Extends OSS::Layout::Sidebar with a header named block and an alwaysExpanded mode that forces the expanded state and hides the expand/collapse toggle; sidebar items/groups now pass through the new anchor routing args, and item rendering/styling is adjusted for icon-less items. Storybook examples and integration tests are updated/added to cover these behaviors.

Written by Cursor Bugbot for commit 7a85ce9. This will update automatically on new commits. Configure here.

@Elodie-DeMatteis-Upf Elodie-DeMatteis-Upf self-assigned this Jan 8, 2026
@Elodie-DeMatteis-Upf Elodie-DeMatteis-Upf marked this pull request as ready for review January 8, 2026 14:28
{{/if}}

<div class="oss-sidebar-item__label">
<div class={{concat "oss-sidebar-item__label" (unless @icon " oss-sidebar-item__label--no-icon")}}>
Copy link

Choose a reason for hiding this comment

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

Label no-icon class ignores icon named block usage

Medium Severity

The oss-sidebar-item__label--no-icon class is applied based solely on @icon being falsy via (unless @icon ...), but this doesn't account for when an icon is rendered via the named block. When using <:icon> without providing @icon (a valid pattern used in sidebar.hbs for the home logo), the label incorrectly receives the --no-icon class with extra left padding, even though an icon is visually present.

Fix in Cursor Fix in Web

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 3 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

const route = this.args.routePrefix ? this.args.routePrefix + '.' + this.args.link : this.args.link;
try {
return Boolean(this.router.urlFor(this.args.link));
return Boolean(this.router.urlFor(route));
Copy link

Choose a reason for hiding this comment

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

LinkTo route mismatch between validation and navigation

High Severity

The isInternalRoute getter validates whether routePrefix + '.' + link exists as a route, but the template passes only @link (without the prefix) to <LinkTo @route={{@link}}>. When routePrefix="display" and link="index", the component validates that "display.index" exists, but then creates a link that navigates to "index" instead. This causes navigation to the wrong route or a route error.

Additional Locations (1)

Fix in Cursor Fix in Web

export const BasicUsage = DefaultUsageTemplate.bind({});
BasicUsage.args = {
link: 'https://www.upfluence.com',
disableAutoActive: false,
Copy link

Choose a reason for hiding this comment

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

Storybook args defined but not used in template

Low Severity

The disableAutoActive property is defined in argTypes and added to BasicUsage.args, but the story template at line 71 does not pass @disableAutoActive={{this.disableAutoActive}} or @routePrefix={{this.routePrefix}} to the component. This creates non-functional Storybook controls that appear in the UI but have no effect when changed, which is confusing for developers using Storybook to explore the component's API.

Additional Locations (1)

Fix in Cursor Fix in Web

control: {
type: 'boolean'
}
},
Copy link

Choose a reason for hiding this comment

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

Storybook argType defined but never used in story

Low Severity

The disableAutoActive argType is added to the sidebar item stories configuration, but it's not included in defaultArgs and the template doesn't pass it to the component. This creates a non-functional Storybook control that users can interact with but has no visible effect.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants