Skip to content

docs: update code guidelines and add UI component skill#1220

Open
bmahabirbu wants to merge 1 commit intokortex-hub:mainfrom
bmahabirbu:docs/code-guidelines-ui-components
Open

docs: update code guidelines and add UI component skill#1220
bmahabirbu wants to merge 1 commit intokortex-hub:mainfrom
bmahabirbu:docs/code-guidelines-ui-components

Conversation

@bmahabirbu
Copy link
Copy Markdown
Contributor

Summary

  • Add UI color guidelines to CODE-GUIDELINES.md: always use color-registry CSS variables (var(--pd-*)) instead of raw Tailwind colors, so themes can tune values
  • Add @podman-desktop/ui-svelte component catalog to CODE-GUIDELINES.md: check the shared library before building custom components
  • Add Icon component usage guidelines (use Icon from @podman-desktop/ui-svelte/icons instead of inline SVGs or direct <Fa>)
  • Add Kortex-specific reusable component reference list
  • Create .agents/skills/ui-components/SKILL.md with detailed reference for AI assistants
  • Add pointer in AGENTS.md to the new skill and guidelines

Addresses feedback from PR #1205 review (benoitf, gastoner).

Test plan

  • Verify CODE-GUIDELINES.md renders correctly on GitHub
  • Verify .agents/skills/ui-components/SKILL.md renders correctly
  • Confirm no existing content was removed from CODE-GUIDELINES.md

🤖 Generated with Claude Code

Add UI development guidelines covering color-registry usage, Icon component
from @podman-desktop/ui-svelte, and component reuse priorities. Adds a new
.agents/skills/ui-components/ skill for detailed reference.

Addresses feedback from PR kortex-hub#1205 review (benoitf, gastoner).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Brian <bmahabir@bu.edu>
@bmahabirbu bmahabirbu requested a review from a team as a code owner April 2, 2026 02:52
@bmahabirbu bmahabirbu requested review from benoitf and gastoner and removed request for a team April 2, 2026 02:52
@bmahabirbu
Copy link
Copy Markdown
Contributor Author

Had claude try and update our code guidlines and add a new ui skill to better help claude make sure its using podman desktop stuff that we already have first

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 2, 2026

📝 Walkthrough

Walkthrough

Three documentation files are added or updated to establish UI component development guidelines: a new SKILL guide, an AGENTS reference update, and expanded CODE-GUIDELINES sections covering component reuse, color theming via CSS variables, and icon usage patterns.

Changes

Cohort / File(s) Summary
UI Component Development Guidelines Documentation
.agents/skills/ui-components/SKILL.md, AGENTS.md, CODE-GUIDELINES.md
Adds and updates documentation establishing UI development rules: component hierarchy (prefer @podman-desktop/ui-svelte, then Kortex shared components), themeable color variables via [var(--pd-...)] pattern instead of raw Tailwind colors, Icon component usage from @podman-desktop/ui-svelte/icons, and preference to extend rather than duplicate components. Includes color registry structure and usage examples.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: updating code guidelines and adding a new UI component skill documentation.
Description check ✅ Passed The description is directly related to the changeset, providing clear details about documentation additions for UI guidelines, component reuse patterns, and icon usage.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 markdownlint-cli2 (0.22.0)
.agents/skills/ui-components/SKILL.md

markdownlint-cli2 v0.22.0 (markdownlint v0.40.0)
Finding: .agents/skills/ui-components/SKILL.md
Linting: 1 file(s)
Summary: 0 error(s)
AggregateError: Unable to import module 'markdownlint-cli2-formatter-summarize'.
at importModule (file:///usr/local/lib/node_modules/markdownlint-cli2/markdownlint-cli2.mjs:90:11)
at async Promise.all (index 0)
at async outputResults (file:///usr/local/lib/node_modules/markdownlint-cli2/markdownlint-cli2.mjs:837:9)
at async main (file:///usr/local/lib/node_modules/markdownlint-cli2/markdownlint-cli2.mjs:1028:5)
at async file:///usr/local/lib/node_modules/markdownlint-cli2/markdownlint-cli2-bin.mjs:14:22 {
[errors]: [
Error: Cannot find module 'markdownlint-cli2-formatter-summarize'
Require stack:
- /usr/local/lib/node_modules/markdownlint-cli2/node_modules/markdownlint/lib/resolve-module.cjs
at Module._resolveFilename (node:internal/modules/cjs/loader:1369:15)
at resolve (node:internal/modules/helpers:14

... [truncated 1151 characters] ...

4:11)
at moduleResolve (node:internal/modules/esm/resolve:859:10)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:801:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:725:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
at onImport.tracePromise.proto (node:internal/modules/esm/loader:659:36)
at TracingChannel.tracePromise (node:diagnostics_channel:344:14)
at ModuleLoader.import (node:internal/modules/esm/loader:658:21) {
code: 'ERR_MODULE_NOT_FOUND',
url: 'file:///markdownlint-cli2-formatter-summarize'
}
]
}

AGENTS.md

markdownlint-cli2 v0.22.0 (markdownlint v0.40.0)
Finding: AGENTS.md
Linting: 1 file(s)
Summary: 0 error(s)
AggregateError: Unable to import module 'markdownlint-cli2-formatter-summarize'.
at importModule (file:///usr/local/lib/node_modules/markdownlint-cli2/markdownlint-cli2.mjs:90:11)
at async Promise.all (index 0)
at async outputResults (file:///usr/local/lib/node_modules/markdownlint-cli2/markdownlint-cli2.mjs:837:9)
at async main (file:///usr/local/lib/node_modules/markdownlint-cli2/markdownlint-cli2.mjs:1028:5)
at async file:///usr/local/lib/node_modules/markdownlint-cli2/markdownlint-cli2-bin.mjs:14:22 {
[errors]: [
Error: Cannot find module 'markdownlint-cli2-formatter-summarize'
Require stack:
- /usr/local/lib/node_modules/markdownlint-cli2/node_modules/markdownlint/lib/resolve-module.cjs
at Module._resolveFilename (node:internal/modules/cjs/loader:1369:15)
at resolve (node:internal/modules/helpers:145:19)
at resolveModu

... [truncated 1123 characters] ...

4:11)
at moduleResolve (node:internal/modules/esm/resolve:859:10)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:801:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:725:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
at onImport.tracePromise.proto (node:internal/modules/esm/loader:659:36)
at TracingChannel.tracePromise (node:diagnostics_channel:344:14)
at ModuleLoader.import (node:internal/modules/esm/loader:658:21) {
code: 'ERR_MODULE_NOT_FOUND',
url: 'file:///markdownlint-cli2-formatter-summarize'
}
]
}

CODE-GUIDELINES.md

markdownlint-cli2 v0.22.0 (markdownlint v0.40.0)
Finding: CODE-GUIDELINES.md
Linting: 1 file(s)
Summary: 3 error(s)
AggregateError: Unable to import module 'markdownlint-cli2-formatter-summarize'.
at importModule (file:///usr/local/lib/node_modules/markdownlint-cli2/markdownlint-cli2.mjs:90:11)
at async Promise.all (index 0)
at async outputResults (file:///usr/local/lib/node_modules/markdownlint-cli2/markdownlint-cli2.mjs:837:9)
at async main (file:///usr/local/lib/node_modules/markdownlint-cli2/markdownlint-cli2.mjs:1028:5)
at async file:///usr/local/lib/node_modules/markdownlint-cli2/markdownlint-cli2-bin.mjs:14:22 {
[errors]: [
Error: Cannot find module 'markdownlint-cli2-formatter-summarize'
Require stack:
- /usr/local/lib/node_modules/markdownlint-cli2/node_modules/markdownlint/lib/resolve-module.cjs
at Module._resolveFilename (node:internal/modules/cjs/loader:1369:15)
at resolve (node:internal/modules/helpers:145:19)
at re

... [truncated 1132 characters] ...

4:11)
at moduleResolve (node:internal/modules/esm/resolve:859:10)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:801:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:725:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
at onImport.tracePromise.proto (node:internal/modules/esm/loader:659:36)
at TracingChannel.tracePromise (node:diagnostics_channel:344:14)
at ModuleLoader.import (node:internal/modules/esm/loader:658:21) {
code: 'ERR_MODULE_NOT_FOUND',
url: 'file:///markdownlint-cli2-formatter-summarize'
}
]
}


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.agents/skills/ui-components/SKILL.md:
- Around line 126-136: The button prefix examples in SKILL.md are inconsistent
with the actual registered IDs; update the doc to mirror the exact
prefixes/variable names used in the implementation (see initColors(),
initButton(), initInput(), initTable() and the prefix constants such as the one
referenced as const button = 'button-') by checking
packages/main/src/plugin/color-registry.ts and replacing the example
`button-`/`--pd-button-primary-bg` entries with the exact prefixes and CSS
variable names registered there so the docs and code match.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 17241c87-8f8a-44ad-bafc-27c5daafd32b

📥 Commits

Reviewing files that changed from the base of the PR and between 1c59e7b and c92a9e9.

📒 Files selected for processing (3)
  • .agents/skills/ui-components/SKILL.md
  • AGENTS.md
  • CODE-GUIDELINES.md

Comment on lines +126 to +136
2. Find the appropriate category in `initColors()` (e.g. `initButton()`, `initInput()`, `initTable()`)
3. Each category has a prefix constant (e.g. `const button = 'button-';`)
4. The CSS variable name is `--pd-` + prefix + specific name

### Common color categories and prefixes

| Category | Prefix | Example variable | Usage |
| ---------- | -------------- | ------------------------ | ---------------------- |
| Content | `content-` | `--pd-content-bg` | Page backgrounds, text |
| Button | `button-` | `--pd-button-primary-bg` | Button colors |
| Input | `input-field-` | `--pd-input-field-bg` | Form input colors |
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Keep color-registry button examples consistent with actual registered IDs.

This section repeats the same button- example naming; once verified in packages/main/src/plugin/color-registry.ts, please mirror the exact prefix/variable names here too, so both docs stay consistent.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.agents/skills/ui-components/SKILL.md around lines 126 - 136, The button
prefix examples in SKILL.md are inconsistent with the actual registered IDs;
update the doc to mirror the exact prefixes/variable names used in the
implementation (see initColors(), initButton(), initInput(), initTable() and the
prefix constants such as the one referenced as const button = 'button-') by
checking packages/main/src/plugin/color-registry.ts and replacing the example
`button-`/`--pd-button-primary-bg` entries with the exact prefixes and CSS
variable names registered there so the docs and code match.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

@gastoner gastoner left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM lets try :D

| `Carousel` | `@podman-desktop/ui-svelte` | Carousel |
| `ListOrganizer` | `@podman-desktop/ui-svelte` | List management |
| `SettingsNavItem` | `@podman-desktop/ui-svelte` | Settings navigation |
| `Icon` | `@podman-desktop/ui-svelte/icons` | Unified icon rendering |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe I would add some refference here to something more dynamic and not hardcoded, but we can iterate on this

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants