Skip to content

Commit c66dbae

Browse files
jeremyederclaudeAmbient Code Bot
authored
feat(frontend): replace custom components with shadcn/ui equivalents (#778)
**Jira:** [RHOAIENG-51883](https://issues.redhat.com/browse/RHOAIENG-51883) hey, this came from looking into new shadcn components to improve the UI - it found several clean-ups. I've been running this patchset, it's not massively different visually but it does align a few things with the shadcn defaults. The command palette is really awesome actually. ## Summary - Replaced 4 custom component implementations with standard shadcn/ui equivalents (Breadcrumb, Popover, Sonner toast, DataTable with TanStack Table) - Added 6 new shadcn components: Command palette (Cmd+K), Sheet (mobile nav), Sidebar (workspace layout), Collapsible, HoverCard, Pagination - Deleted 5 files of hand-rolled code (~1,574 lines removed): breadcrumbs.tsx, simple-data-table.tsx, toast.tsx, toaster.tsx, use-toast.tsx - Net change: +266 lines across 61 files ## Test plan - [ ] Verify workspace pages render with Sidebar layout and Breadcrumb navigation - [ ] Test mobile navigation Sheet drawer on narrow viewport - [ ] Confirm Command palette opens with Cmd+K and searches projects - [ ] Verify toast notifications work via Sonner across all forms (connection cards, session actions, settings) - [ ] Test HoverCard previews on session name links in sessions table - [ ] Confirm Collapsible sections toggle in settings and create-session dialog - [ ] Test Pagination controls on workspaces and sessions tables - [ ] Verify no regressions in session detail page 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Ambient Code Bot <bot@ambient-code.local>
1 parent e40cecf commit c66dbae

72 files changed

Lines changed: 4835 additions & 1580 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ repos:
1313
args: ['--maxkb=1000']
1414
- id: check-merge-conflict
1515
- id: detect-private-key
16+
exclude: 'components/manifests/overlays/production/github-app-secret\.yaml'
1617

1718
# ── Python (ruff) ────────────────────────────────────────────────────
1819
- repo: https://github.com/astral-sh/ruff-pre-commit

components/ambient-sdk/generator/main.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,8 @@ func generatePython(spec *Spec, outDir string, header GeneratedHeader) error {
299299

300300
func loadTemplate(path string) (*template.Template, error) {
301301
funcMap := template.FuncMap{
302-
"snakeCase": toSnakeCase,
303-
"lower": strings.ToLower,
302+
"snakeCase": toSnakeCase,
303+
"lower": strings.ToLower,
304304
"title": func(s string) string {
305305
if s == "" {
306306
return s
@@ -345,7 +345,7 @@ func executeTemplate(tmpl *template.Template, outPath string, data interface{})
345345
if err != nil {
346346
return err
347347
}
348-
defer f.Close()
348+
defer func() { _ = f.Close() }()
349349

350350
return tmpl.Execute(f, data)
351351
}
@@ -368,10 +368,10 @@ func computeSpecHash(specPath string) (string, error) {
368368
return "", fmt.Errorf("open %s: %w", f, err)
369369
}
370370
if _, err := io.Copy(h, fh); err != nil {
371-
fh.Close()
371+
_ = fh.Close()
372372
return "", fmt.Errorf("read %s: %w", f, err)
373373
}
374-
fh.Close()
374+
_ = fh.Close()
375375
}
376376

377377
return fmt.Sprintf("%x", h.Sum(nil)), nil

components/ambient-sdk/generator/model.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ func pluralize(name string) string {
221221

222222
// Check for already plural words ending in settings, data, etc.
223223
if strings.HasSuffix(lower, "settings") || strings.HasSuffix(lower, "data") ||
224-
strings.HasSuffix(lower, "metadata") || strings.HasSuffix(lower, "info") {
224+
strings.HasSuffix(lower, "metadata") || strings.HasSuffix(lower, "info") {
225225
return lower
226226
}
227227

0 commit comments

Comments
 (0)