Skip to content

feat: turn template banner green when all chatflows are up to date#1073

Merged
ct3685 merged 1 commit into
stagingfrom
ct/template-banner-green-when-all-current
May 15, 2026
Merged

feat: turn template banner green when all chatflows are up to date#1073
ct3685 merged 1 commit into
stagingfrom
ct/template-banner-green-when-all-current

Conversation

@ct3685
Copy link
Copy Markdown

@ct3685 ct3685 commented May 15, 2026

Summary

The Organization Default Template banner now reflects the actual sync state of the org:

  • Any chatflows outdated → amber/yellow (existing look, unchanged)
  • All chatflows current → green

How it works

A hasOutdated boolean is derived inline from chatflowsData (already in scope):

const hasOutdated = chatflowsData.some((cf) => cf.templateStatus === 'outdated')

A bc (banner colors) palette object is keyed on that boolean, providing green vs amber values for every color token used in the banner: background, border, text, muted text, icon colors, hover states, chips, and the DEFAULT TEMPLATE badge.

All hardcoded isDarkMode ? 'rgba(255, 193, 7, ...)' : '#...' strings inside the banner block are replaced with bc.* references. Nothing outside the banner block is touched.

Test Plan

  • With at least one outdated chatflow → banner stays amber
  • After pushing updates so all are current → banner turns green
  • Works in both light and dark mode

@ct3685 ct3685 added enhancement New feature or request ui labels May 15, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented May 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
answerai-docs Building Building Preview May 15, 2026 7:07pm
the-answerai Building Building Preview May 15, 2026 7:07pm

Request Review

@ct3685 ct3685 merged commit 7314af5 into staging May 15, 2026
6 of 8 checks passed
@ct3685 ct3685 deleted the ct/template-banner-green-when-all-current branch May 15, 2026 19:22
ct3685 added a commit that referenced this pull request May 15, 2026
…g, always-green badge (#1074)

## Summary

Combines the green/amber theming (from #1073) with new collapsible +
count pill enhancements, all in one PR targeting staging.

## What changed

**Collapsible banner**
- Clicking anywhere on the header row toggles the details section
open/closed
- Animated with `maxHeight` transition (same pattern as the filter
panel)
- Chevron icon rotates 180° when expanded
- Smart default: expands automatically when there are outdated
chatflows, collapses when all are current — no flash, no useEffect
- User preference persisted in `localStorage` under
`adminTemplateBannerExpanded`; once manually toggled the stored
preference takes over

**Count pill**
- Always visible in the header (visible even when collapsed)
- Shows `N outdated` in amber when any are behind, or `All current` in
green when everything is synced

**Green/amber theming**
- Full `bc` color palette: amber when any chatflows outdated, green when
all current — applied to border, background, text, muted labels,
category chips, icon buttons, hover states
- Action icon buttons use `e.stopPropagation()` so clicking
View/Metrics/History doesn't accidentally toggle the banner

**DEFAULT TEMPLATE badge always green**
- Banner header badge: always green regardless of sync state
- Table row chip: always green (was amber)

## Test Plan

- [ ] With outdated chatflows: banner is amber, auto-expands on first
load, shows "N outdated" pill
- [ ] After pushing all current: banner turns green, auto-collapses on
first load, shows "All current" pill
- [ ] Click header to collapse/expand; reload and confirm preference is
remembered
- [ ] Click View/Metrics/Version History buttons — confirm banner does
NOT toggle
- [ ] DEFAULT TEMPLATE chip in table rows is green
- [ ] Both light and dark mode
ct3685 added a commit that referenced this pull request May 15, 2026
## 🚀 Release: Staging to Production

**Release Date:** 2026-05-15

### Changes in this release

- fix: add missing KeyboardArrowDownIcon import (7d7216e)
- feat: collapsible template banner with count pill, green/amber
theming, always-green badge (#1074) (99e0c8b)
- feat: turn template banner green when all chatflows are up to date
(#1073) (7314af5)
- fix: reload page after bulk chatflow update and show in-progress state
(#1072) (5ca478d)
- fix: preserve workspaceId in bulkUpdateChatflows + optional template
name sync (#1071) (3e166d6)
- chore: update dependencies for improved compatibility and
functionality (#1070) (6451d83)
- fix: restore Atlassian MCP OAuth by removing stale Passport dependency
(#1068) (00bae11)

---
*This PR is automatically created/updated when commits are pushed to
staging.*
*Merging this PR will trigger the release workflow to create a new
GitHub release.*

---------

Co-authored-by: Cameron Taylor <50385537+ct3685@users.noreply.github.com>
Co-authored-by: Cameron Taylor <cameron@lastrev.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant