fix(editor): Make agent publish indicator dot use correct color (no-changelog) (#29979)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Eugene 2026-05-07 15:05:07 +02:00 committed by GitHub
parent ba5b3d13b1
commit 1a270f2f35
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 35 additions and 3 deletions

View File

@ -335,4 +335,36 @@ describe('AgentPublishButton', () => {
expect(unpublishAgent).not.toHaveBeenCalled();
expect(wrapper.emitted('unpublished')).toBeUndefined();
});
// Indicator dot styling — guards against regressions like
// using subtle text-color tokens that render an invisible dot.
describe('indicator dot', () => {
it('does not render the indicator when the agent is not published', async () => {
const wrapper = await renderComponent({
agent: createAgent({ publishedVersion: null }),
});
const button = wrapper.find('[data-testid="publish-agent-button"]');
expect(button.find('span[class*="indicatorDot"]').exists()).toBe(false);
});
it('renders the published indicator when latest version is published', async () => {
const wrapper = await renderComponent({
agent: createAgent({ versionId: 'v1', publishedVersion }),
});
const dot = wrapper.find('[data-testid="publish-agent-button"] span[class*="indicatorDot"]');
expect(dot.exists()).toBe(true);
expect(dot.classes().some((c) => c.includes('indicatorPublished'))).toBe(true);
expect(dot.classes().some((c) => c.includes('indicatorChanges'))).toBe(false);
});
it('renders the changes indicator when there are unpublished changes', async () => {
const wrapper = await renderComponent({
agent: createAgent({ versionId: 'v2', publishedVersion }),
});
const dot = wrapper.find('[data-testid="publish-agent-button"] span[class*="indicatorDot"]');
expect(dot.exists()).toBe(true);
expect(dot.classes().some((c) => c.includes('indicatorChanges'))).toBe(true);
expect(dot.classes().some((c) => c.includes('indicatorPublished'))).toBe(false);
});
});
});

View File

@ -191,15 +191,15 @@ async function onDropdownSelect(action: string) {
}
.indicatorPublished {
background-color: var(--text-color--success);
background-color: var(--color--mint-600);
}
.indicatorPublishedText {
color: var(--text-color--subtle);
color: var(--color--text--tint-1);
}
.indicatorChanges {
background-color: var(--text-color--warning);
background-color: var(--color--yellow-500);
}
.flex {