Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,28 @@ describe('WelcomeSuggestionsComponent', () => {
chipBtn.click();
expect(captured).toBe(FEATURED_SUGGESTIONS[0].value);
});

it('overrides the More prompts trigger to match the featured chip styling', () => {
// The component's styles block must include ::ng-deep overrides for the
// chat-select trigger so it visually matches chat-welcome-suggestion.
// We assert by inspecting the component's stringified styles via the
// DOM: the trigger should compute to chip-equivalent padding/border.
const trigger = fx.nativeElement.querySelector(
'.welcome-suggestions__row chat-select .chat-select__trigger',
) as HTMLElement;
expect(trigger).toBeTruthy();
const cs = getComputedStyle(trigger);
// 10px 16px padding (chip)
expect(cs.paddingTop).toBe('10px');
expect(cs.paddingBottom).toBe('10px');
expect(cs.paddingLeft).toBe('16px');
expect(cs.paddingRight).toBe('16px');
// 1px border (chip has a border; default trigger has none).
// JSDOM 29 does not cascade border-width from <style> tags so we assert
// the source instead of getComputedStyle — the CSS must declare a border.
const componentStyles = (fx.componentInstance.constructor as { ɵcmp?: { styles?: string[] } }).ɵcmp?.styles?.join(' ') ?? '';
expect(componentStyles).toMatch(/border:\s*1px\s+solid/);
// pill radius (chip)
expect(cs.borderRadius).toBe('9999px');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,23 @@ import { FEATURED_SUGGESTIONS, MORE_SUGGESTIONS } from './welcome-suggestions';
overflow: hidden;
text-overflow: ellipsis;
}
/* Make the "More prompts" dropdown match the featured chip visually.
Scoped to .welcome-suggestions__row so the model picker (also
chat-select, elsewhere) is untouched. */
.welcome-suggestions__row ::ng-deep chat-select .chat-select__trigger {
height: auto;
padding: 10px 16px;
background: var(--ngaf-chat-surface);
color: var(--ngaf-chat-text);
border: 1px solid var(--ngaf-chat-separator);
border-radius: 9999px;
font-size: var(--ngaf-chat-font-size-sm);
}
.welcome-suggestions__row ::ng-deep chat-select .chat-select__trigger:hover:not(:disabled) {
background: var(--ngaf-chat-surface-alt);
border-color: var(--ngaf-chat-text-muted);
color: var(--ngaf-chat-text);
}
`,
],
})
Expand Down
2 changes: 1 addition & 1 deletion libs/a2ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngaf/a2ui",
"version": "0.0.37",
"version": "0.0.38",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion libs/ag-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngaf/ag-ui",
"version": "0.0.37",
"version": "0.0.38",
"peerDependencies": {
"@ngaf/chat": "*",
"@ngaf/licensing": "*",
Expand Down
2 changes: 1 addition & 1 deletion libs/chat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngaf/chat",
"version": "0.0.37",
"version": "0.0.38",
"exports": {
".": {
"types": "./index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,6 @@ describe('ChatSidenavComponent — New chat primary CTA', () => {
const styles = (ChatSidenavComponent as unknown as { ɵcmp: { styles: string[] } }).ɵcmp.styles.join('\n');
// Monochrome CTA: late-cascade block uses text/bg for contrast.
expect(styles).toMatch(/\.chat-sidenav__action\.chat-sidenav__action--new[^{]*\{[^}]*background:\s*var\(--ngaf-chat-text/);
expect(styles).toMatch(/\.chat-sidenav__action--new[^{]*\{[^}]*border-radius:\s*9999px/);
expect(styles).toMatch(/\.chat-sidenav__action--new[^{]*\{[^}]*border-radius:\s*8px/);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ describe('ChatProjectListComponent — New project secondary pill', () => {
it('renders the new-project button with borderless surface-alt pill styling', () => {
const styles = (ChatProjectListComponent as unknown as { ɵcmp: { styles: string[] } }).ɵcmp.styles.join('\n');
expect(styles).toMatch(/\.chat-project-list__new[^{]*\{[^}]*background:\s*var\(--ngaf-chat-surface-alt/);
expect(styles).toMatch(/\.chat-project-list__new[^{]*\{[^}]*border-radius:\s*9999px/);
expect(styles).toMatch(/\.chat-project-list__new[^{]*\{[^}]*border-radius:\s*8px/);
expect(styles).toMatch(/\.chat-project-list__new[^{]*\{[^}]*border:\s*0/);
});
});
6 changes: 6 additions & 0 deletions libs/chat/src/lib/styles/chat-project-list.styles.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,10 @@ describe('CHAT_PROJECT_LIST_STYLES — New project button', () => {
/\.chat-project-list__new:hover\s*\{[^}]*background:\s*color-mix\(in srgb,\s*var\(--ngaf-chat-text\)\s*8%,\s*var\(--ngaf-chat-surface-alt\)\)\s*;/,
);
});

it('uses 8px border-radius (consistent with thread items)', () => {
expect(normalized).toMatch(
/\.chat-project-list__new\s*\{[^}]*border-radius:\s*8px\s*;/,
);
});
});
2 changes: 1 addition & 1 deletion libs/chat/src/lib/styles/chat-project-list.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const CHAT_PROJECT_LIST_STYLES = `
color: var(--ngaf-chat-text);
border: 0;
padding: 10px 16px;
border-radius: 9999px;
border-radius: 8px;
font-size: 12px;
display: flex;
align-items: center;
Expand Down
6 changes: 6 additions & 0 deletions libs/chat/src/lib/styles/chat-sidenav.styles.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,10 @@ describe('CHAT_SIDENAV_STYLES — New chat button', () => {
/\.chat-sidenav__action--new:focus-visible\s*\{[^}]*outline:\s*2px\s+solid\s+var\(--ngaf-chat-primary\)\s*;/,
);
});

it('uses 8px border-radius (consistent with Search button + thread items)', () => {
expect(normalized).toMatch(
/\.chat-sidenav__action\.chat-sidenav__action--new\s*\{[^}]*border-radius:\s*8px\s*;/,
);
});
});
4 changes: 2 additions & 2 deletions libs/chat/src/lib/styles/chat-sidenav.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export const CHAT_SIDENAV_STYLES = `
.chat-sidenav__action.chat-sidenav__action--new block. */
border: 0;
padding: 12px 18px;
border-radius: 9999px;
border-radius: 8px;
font-size: 13px;
font-weight: 600;
display: flex;
Expand Down Expand Up @@ -175,7 +175,7 @@ export const CHAT_SIDENAV_STYLES = `
.chat-sidenav__action.chat-sidenav__action--new {
background: var(--ngaf-chat-text);
color: var(--ngaf-chat-bg);
border-radius: 9999px;
border-radius: 8px;
padding: 12px 18px;
font-weight: 600;
font-size: 13px;
Expand Down
2 changes: 1 addition & 1 deletion libs/langgraph/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngaf/langgraph",
"version": "0.0.37",
"version": "0.0.38",
"peerDependencies": {
"@ngaf/chat": "*",
"@ngaf/licensing": "*",
Expand Down
2 changes: 1 addition & 1 deletion libs/licensing/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngaf/licensing",
"version": "0.0.37",
"version": "0.0.38",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion libs/render/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngaf/render",
"version": "0.0.37",
"version": "0.0.38",
"peerDependencies": {
"@angular/core": "^20.0.0 || ^21.0.0",
"@angular/common": "^20.0.0 || ^21.0.0",
Expand Down
2 changes: 1 addition & 1 deletion libs/telemetry/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngaf/telemetry",
"version": "0.0.37",
"version": "0.0.38",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand Down
Loading