fix: move model run status dot to top-right corner of icon#68
fix: move model run status dot to top-right corner of icon#68wicky-zipstack merged 2 commits intomainfrom
Conversation
Previously the green/red status dot rendered inline before the model name text. Now it overlays the model icon at the top-right corner.
|
| Filename | Overview |
|---|---|
| frontend/src/ide/explorer/explorer-component.jsx | Extracts getModelRunStatus to a module-level function; wraps model icons with a badge container span when a run status exists. Logic is sound. |
| frontend/src/ide/ide-layout.css | Adds .model-icon-badge-wrapper (position: relative, inline-flex) and .model-status-dot (position: absolute, top-right) CSS classes to support the icon-badge pattern. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["rebuildTree() called"] --> B["item.children.map(child => ...)"]
B --> C["getModelRunStatus(run_status, failure_reason, last_run_at, token)"]
C --> D{run_status}
D -->|RUNNING| E["Tooltip: blue dot"]
D -->|FAILED| F["Popover: red dot"]
D -->|SUCCESS| G["Tooltip: green dot"]
D -->|other| H["null — no badge"]
E --> I{statusBadge != null?}
F --> I
G --> I
H -->|No| J["icon = child.icon"]
I -->|Yes| K["span.model-icon-badge-wrapper\n child.icon + statusBadge"]
K --> L["item.icon = wrappedIcon"]
J --> L
Prompt To Fix All With AI
This is a comment left during a code review.
Path: frontend/src/ide/ide-layout.css
Line: 93-101
Comment:
**No animation for the RUNNING state**
The RUNNING dot renders as a static blue circle, identical in shape to SUCCESS/FAILED. A pulsing animation (e.g. `@keyframes pulse`) would give users a live visual cue that a model is actively executing, matching the convention used by VSCode's spinner badges and similar tools.
```css
@keyframes model-status-pulse {
0%, 100% { opacity: 1; transform: scale(1); }
50% { opacity: 0.5; transform: scale(1.2); }
}
.model-status-dot.running {
animation: model-status-pulse 1.2s ease-in-out infinite;
}
```
You would also add `running` to the className of the RUNNING span in `getModelRunStatus`.
How can I resolve this? If you propose a fix, please make it concise.Reviews (2): Last reviewed commit: "refactor: move status dot inline styles ..." | Re-trigger Greptile
- MODEL_STATUS_DOT_STYLE object → .model-status-dot CSS class - Icon wrapper inline style → .model-icon-badge-wrapper CSS class - Only backgroundColor remains inline (theme-token driven)
What
.model-status-dot,.model-icon-badge-wrapper)Why
How
MODEL_STATUS_DOT_STYLEinline object replaced with.model-status-dotCSS class inide-layout.css.model-icon-badge-wrapperCSS classchild.icon) usingposition: absoluteoverlaybackgroundColorremains inline (driven by antd theme tokens — can't be static CSS)Can this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)
No — this is a purely visual change. Same tooltip/popover behavior on hover, same data flow. The status dot rendering logic is unchanged; only its CSS positioning moved from inline-before-text to overlaid-on-icon.
Database Migrations
None
Env Config
None
Relevant Docs
None
Related Issues or PRs
Dependencies Versions
No changes
Notes on Testing
var(--page-bg-2)so it blends with the backgroundScreenshots
Checklist
🤖 Generated with Claude Code