实现或修改 IntelliJ `AnAction`,并在 `plugin.xml` 中注册。将显示名称和说明写入消息资源文件,按需设置图标,并通过事件协程作用域启动挂起任务,避免同步处理阻塞 IDE。
- 为 IDE 菜单添加操作
- 修改操作注册或图标
- 整理操作名称和说明
用于评审 JetBrains Jewel 的 Compose Desktop 界面,检查主题适配、IDE 交互习惯及 API 使用,并依据代码指出颜色、控件、图标、布局和状态方面的问题。
Audit Jewel UI theming and idioms.
实测评分 未实测
查看安装方法本技能评审使用 JetBrains Jewel 构建的 Compose Desktop 界面,检查主题适配、IDE 用户熟悉的外观与交互习惯,以及 Jewel 和 Compose API 的使用方式。首先区分独立 Compose Desktop 应用和嵌入 IntelliJ IDE 的插件,因为两者适用的主题及颜色 API 不同。随后检查固定写入的颜色、间距和形状,是否有可由内置控件替代的自定义界面,列表选择与搜索行为、工具提示,以及异步处理中界面的呈现。每项发现都联系到代码依据,并说明对使用者的影响。本技能不用于全面审查架构、运行性能或整体无障碍体验。
需要确认 Jewel 界面能否跟随 IDE 主题切换,或交互方式是否符合 IntelliJ 惯例时适用。也可用于检查独立应用与插件不同的主题配置,以及自定义控件、图标和列表行为。评审依据实际代码及受影响的界面,不只依据外观偏好。
全面无障碍检查可使用 ui-accessibility;Compose 状态管理、性能或结构审查可使用 compose-ui-audit;选择 Jewel 控件或主题 API 可参考 jewel-ui。
本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。
AI 根据 SKILL.md 的内容检查了需要注意的操作和使用前提。评分只依据实际运行的结果(实测对比)。
不计入评分。 由 AI(OpenAI Codex)于 2026年10月28日 评估。仅供参考,安装前请同时查看原文。
安装前可以查看交给 AI 代理的指令内容。
Review Compose UI built with JetBrains Jewel for two intertwined concerns:
This is a UX-and-API-usage review, not an architecture, runtime-performance, or pure-accessibility review (route those elsewhere; see "When to use").
Jewel runs in two contexts, and the correct answer to many findings depends on which one applies. Determine it before reviewing, because it changes the right fix, not just the wording:
retrieveColorOrUnspecified("SomeKey") /
retrieveColorOrNull against IDE LaF keys), the bridge theme/styling providers are used, and the surface must track
IDE theme switches and LaF changes.Using standalone-only assumptions in a plugin (or vice versa) is itself a finding. When the context is not obvious from imports/dependencies, say which you assumed.
Within the IDE/bridge context there are three theme generations:
Detect New UI via NewUI.isEnabled or JewelTheme.newUiChecker.isNewUi(). Islands has no Jewel-native check yet;
IntelliJ Platform offers IslandsState.isEnabled (only possible under New UI). Read
references/standalone-vs-bridge.md for the full distinction, API-misuse checklist, LaF-fallback rules, and
theming-container pattern.
Apply three hard rules when a plugin reads values from the LaF. Missing keys break untested themes and standalone UI runs (such as UI unit tests, where no IJPL LaF exists):
Unspecified. Prefer a layered fallback: primary key, palette/secondary key, then hardcoded
default.retrieve* calls through composables.
Standalone code can hardcode the defaults in that container (see references/standalone-vs-bridge.md). Read
references/portability-structuring.md to structure content composables and injected theming for both plugin and
standalone preview/test runs.This skill is read/evidence-based. Search hits are leads; read the surrounding code and confirm the concern is real and user-visible (or a real API misuse) before reporting.
Before reporting a finding:
For the first-pass pattern cards, read references/quick-triggers.md. Use those triggers to decide which detailed
reference to open next; they are not a substitute for reading the actual code.
The upstream source for IntelliJ UI conventions is the JetBrains UI Guidelines: https://plugins.jetbrains.com/docs/intellij/ui-guidelines-welcome.html (colors, layout/spacing, controls, text, and component behavior). Although written for Swing UI, its design principles apply equally to Jewel/Compose surfaces, which must match the same IDE. These principles include flat Int UI visuals, theme-driven colors, consistent spacing, standard controls, and restrained motion.
Treat the guidelines as the design intent and this skill as how to check Jewel/Compose code against it. Cite the guidelines when a finding rests on an IDE convention (separator weight, control sizing, spacing rhythm, or color roles). Prefer existing patterns to novel ones unless there is a strong reason to diverge.
Use when authoring or reviewing Jewel/Compose Desktop UI that ships inside an IntelliJ-based IDE (platform, product, or plugin), and the question is whether the visuals and interactions are themeable and idiomatic.
Defer, or hand off, when the primary concern is:
ui-accessibility skill to audit screen readers, keyboard operability, focus order, and accessible names or
roles (this skill references ui-accessibility without replacing it).compose-ui-audit skill to review Compose composition, state, and effect architecture, recomposition,
lazy-list keys, and runtime performance.jewel-ui skill for the catalog; use
this skill to judge whether an existing choice is idiomatic.These overlap. It is fine to raise a finding that also belongs to another skill; say so and keep the design-system reasoning here.
Apply these to every styled element, custom component, and interaction. They are the core of the skill.
retrieveColor*.Color(...)/Color.X calls or bare dp magic numbers as leads.references/standalone-vs-bridge.md). Reaching around Jewel to
raw Swing/UIManager/JBColor from Compose, or using standalone palette entries in a plugin that must read LaF
keys, is an API-usage finding.EditorColorsManager.getInstance(), Project) violate Compose architecture:
Project (com.intellij.openapi.project.Project) into @Composable functions leaks platform coupling and
breaks stability tracking (Project lacks stable equals/hashCode), causing recomposition churn.CompositionLocals like LocalProject to pass platform instances implicitly. Use abstract
state and explicit provider boundaries instead.Divider,
SimpleListItem, SingleSelectionLazyColumn/MultiSelectionLazyColumn, group headers, standard scrollbars) over
bespoke components. A custom treatment needs a concrete requirement the built-in cannot meet. Flag structural
component reinvention (such as hand-rolling menus or lists) before reviewing micro-styling or custom hover states.Start with references/quick-triggers.md for palette-index, custom-key, and bridge-read trigger cards. Read
references/theming-and-color.md when you find color or dimension literals, or suspect a wrong color role. In the
bridge/plugin context, read references/bridge-laf-read-api.md for the LaF read-helper catalog and safe-vs.-raw
fallback forms.
Read references/ijpl-theming-and-editor-scheme.md when a surface touches editor/syntax content, reads
EditorColorsManager/EditorColorsScheme, captures JBColor into Compose colors, or caches theme values across
switches. The UI LaF and editor color scheme are independent systems with separate change events.
Read references/theme-key-resolution.md when reviewing *.theme.json files (missing keys, parent inheritance, *
wildcards, per-OS values, nested-key flattening, or named-color aliases) to see how the loader populates UIDefaults.
Flag:
Color(0x...), Color.Red, Color.DarkGray, etc. Resolve to a Jewel global color, an Int UI
palette entry, or a Swing LaF key instead. Replacing a previously themed value with a literal is a strong red flag,
especially when the original themed value sits commented out beside it.borders.* token used as a .background(...) fill: border
tokens are tuned for 1 px separators and diverge from panel/background tokens under custom themes. Use a content/panel
background role.RoundedCornerShape(8.dp), paddings, and sizes
across files without a shared token. Reviewers must also verify how those dimensions respond to IDE zoom and density,
including the .compact density variants that Int UI and Islands expose.Do not flag a value derived from the theme just because it contains a literal. A size computed as an offset or scale
of JewelTheme.defaultTextStyle.fontSize scales with IDE font settings and is the model to follow. The rule is
"themeable by derivation," not "no numbers anywhere."
Mechanism note: Jewel typography and platform JBFont derive sizes additively via biggerOn/lessOn, not by a fixed
multiplier. Do not assert a specific ratio as the type scale; require derivation from the theme base.
Read references/idiomatic-components.md for the built-in vs custom decision and the Int UI concept boundaries.
Flag:
shadowElevation or drop shadows via graphicsLayer,
Material ripples, or FAB-like floating buttons. Components must express grouping and state with borders,
background-fill deltas, and selection instead.FileEditor/tool-window surface, check getPolicy() and
similar: FileEditorPolicy.HIDE_OTHER_EDITORS (or anything that seizes the frame or forces focus) is a UX takeover
that is wrong for a non-modal informational screen. This lives in a provider/factory file, not the composable, so look
for it deliberately.Image(painterResource(...)) instead of an IconKey + the Icon
composable/painter provider. Hand-built loading loses New-UI path mapping, dark variants, and theme recoloring.
IconLoader may look for @2x.svg, while
Jewel's HiDpi hint does not apply @2x to SVGs. A Jewel load failure renders magenta, whereas classic Swing often
fails blank or silent.Selected, Disabled, _dark) are optional fallbacks.
The bare base icon must exist because Jewel falls through to it at the end of the hint branch.PainterHint.Stroke(color) (or IconActionButton/SelectableIconActionButton, which pass Stroke) at
load time for stroke-based SVGs.ColorFilter.tint() to filled, multi-color, or gradient icons; it clobbers fill
alpha and interior details to solid colors. Never mix PainterHint.Stroke(color) with ColorFilter.tint(). See
references/icon-loading.md.ClassLoader. Referencing another plugin's icon class or resource often works from sources but breaks silently in
packaged builds due to isolated per-plugin classloaders.
references/icon-loading.md for IconKey/PainterHint, AllIcons/IconLoader, and classloader traps.com.intellij.platform.icons framework, read references/icon-loading-experimental.md (do not
call it unbundled; the concern is @Internal/@Experimental API stability).Start with references/quick-triggers.md for validation, text-selection, focus, and list trigger cards. Then read
references/interaction-and-affordances.md for hover/focus/keyboard, tooltip, and context-menu patterns,
references/accessibility-semantics.md for contentDescription and focus/keyboard semantics handoff, and
references/selection-and-lists.md for selectable lists, text-selection scope, and scroll-derived selection.
Flag:
swingCompatMode suppresses hover/pressed for many controls and plain rows stay flat, so custom
hoverable/collectIsHoveredAsState highlights stand out.backgroundActive is for active/pressed states, not hover.
Always name the exceptions that do hover in the bridge: tabs, scrollbars, and icon buttons (not plain rows).Column/LazyColumn with manual selected = ... + .clickable { } instead of
SingleSelectionLazyColumn/MultiSelectionLazyColumn (which replaced deprecated SelectableLazyColumn, usually with
SimpleListItem rows):
SimpleListItem is the right row component; the defect is hand-rolling the selection container, which owns
selection state, keyboard navigation (arrows, home/end), and focus. Check speed search separately for non-trivial
lists.SimpleListItem for the row body, preserve that reuse in Justified as-is instead of
recommending raw Text/custom rows.scrollToItem is "laggy": IDE lists use instant step jumps
(scrollToItem) during keyboard navigation to match platform desktop conventions, not smooth animated scrolling
(animateScrollToItem). Instant step jumps are intentional; do not claim they are laggy.SpeedSearchableLazyColumn/SpeedSearchArea (or SpeedSearchableTree/
SpeedSearchableComboBox). See references/selection-and-lists.md.items[lazyListState.firstVisibleItemIndex]). At the
end of scroll, the last item sits at the bottom of the viewport while an earlier item owns the top. As a result,
trailing items never become "first visible." A working active-section model special-cases end-of-scroll and keys off a
threshold crossing.SelectionContainer or selectable = true over a
composite layout). This shows the text I-beam cursor over non-text layouts, images, and padding, and lets selection
bleed across sections.
DisableSelection, but the More IconButton does not"). Every nested action control needs DisableSelection and
arrow-pointer handling.Tooltip component; keep content factual (action
name, shortcut, full value). Overlaps ui-accessibility for icon buttons. See
references/interaction-and-affordances.md.TextContextMenu for text and the built-in menu/popup
components for item menus, not a bespoke dropdown (Jewel's internal ContextMenu is not a public entry point).
See references/interaction-and-affordances.md.Start with references/quick-triggers.md for resizable-pane, prose-width, and raw-scroll trigger cards. Then read
references/spacing-and-layout.md for the additive-stacking analysis pattern.
Flag:
Arrangement.spacedBy), not parent arrangement plus each child's outer padding plus a
grandparent arrangement. Compute the effective gap by hand to expose the stack.padding(8.dp) works horizontally, but vertical spacings
can stack on top of it, yielding smaller horizontal margins inside oversized vertical margins. Compare horizontal and
vertical spacing at each seam (inner padding, inter-item, inter-row), and check whether asymmetric margins match
similar codebase layouts.Alignment.CenterVertically does not align baselines when multiple text
styles (such as UI font + editor code font, or mixed font sizes) share a line. Use AnnotatedString in a single
Text composable when possible, or explicit baseline alignment (Row(verticalAlignment = Alignment.Bottom) or
Modifier.alignByBaseline()). Always visually verify baseline alignment when fixing mixed-style text lines.blockVerticalSpacing) as a layout margin, so changing content
density silently changes layout gutters. Keep content spacing and layout spacing as separate tokens.Read references/async-and-states.md for the required-states checklist and the absence checklist.
This area covers expected capabilities that are absent from the code. Examples include a feed without "new since last seen" tracking, a network dependency without loading/offline states, or an emptyable view without an empty state.
Because there is no code line to grep, run the absence checklist in references/async-and-states.md against the
feature's purpose and report missing capabilities with their user-facing consequence.
Flag:
null into flow content) while loading: no reserved space causes layout shift as
each image arrives; reserve a fixed-ratio placeholder. Provide a loading indicator/shimmer and an error affordance
(alt text or broken-image state), not a silent permanent gap or vanishing into nothing.ui-accessibility skill when checking for contentDescription = "",
noisy duplicate image descriptions, or icon-only controls and toggles that lack concise action or state descriptions.
Reviewers must apply references/accessibility-semantics.md for triage while routing full semantics verification to
ui-accessibility.V2Bundle.message(...)).
Prioritize i18n bundle string usage and proper trailing ellipsis rules over subjective or pedantic nitpicks about
search placeholder verb wording.## Summary
[overall: idiomatic and themeable/targeted fixes/significant rework]
## Findings
1. [severity] [finding] — `path:line`
- Why it matters (theming/role/idiom/interaction/spacing/state)
- Suggested fix (name the built-in, token, or pattern to use)
2. ...
## Justified as-is
[custom treatments that are appropriate, with the reason — so reviewers don't churn them]
## Confidence and limits
[what was checked; what needs runtime/zoom/theme-switch/human verification]
Always include a "Justified as-is" section when the code has custom components or non-default values that are appropriate. The skill's value is as much in not flagging justified choices (and the themeable-by-derivation pattern) as in catching the violations.
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
实现或修改 IntelliJ `AnAction`,并在 `plugin.xml` 中注册。将显示名称和说明写入消息资源文件,按需设置图标,并通过事件协程作用域启动挂起任务,避免同步处理阻塞 IDE。
将 IntelliJ JPS 测试模块迁移到 Bazel,并排查仅在 Bazel 中出现的失败。根据症状检查依赖、插件、测试数据和 runfiles,重新生成并验证目标。
按 IntelliJ 项目规范编写或审查 Kotlin 和 Java 代码,涵盖语言选择、格式、密封类型、线程注解及控制流异常处理。
本指南帮助您按 IntelliJ 项目规则拆分更改并撰写提交信息:有工单时使用编号和变更说明,无工单时使用标签与子系统名,并在需要时说明原因和决定。
使用多个 Python 类型检查器比较代码片段或文件的类型推断和报错判断,并汇总各工具的结论、耗时与诊断信息,可保存为 Markdown 报告。
整理 Compose Desktop 界面中的状态和副作用,让可组合函数负责绘制,由展示器或协调器处理应用决策。了解状态归属、Effect、可复用组件接口、延迟列表键、动画和性能,适用于单项界面修改。