Skip to content

Commit 752265f

Browse files
authored
add a preview component for tabs, update contextmenu model w/ getInstance method (#2927)
1 parent 200863b commit 752265f

File tree

7 files changed

+326
-122
lines changed

7 files changed

+326
-122
lines changed

.kilocode/skills/context-menu/SKILL.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import { ContextMenuModel } from "@/app/store/contextmenu";
4040
To display the context menu, call:
4141

4242
```ts
43-
ContextMenuModel.showContextMenu(menu, event);
43+
ContextMenuModel.getInstance().showContextMenu(menu, event);
4444
```
4545

4646
- **menu**: An array of `ContextMenuItem`.
@@ -75,7 +75,7 @@ const menu: ContextMenuItem[] = [
7575
},
7676
];
7777

78-
ContextMenuModel.showContextMenu(menu, e);
78+
ContextMenuModel.getInstance().showContextMenu(menu, e);
7979
```
8080

8181
---
@@ -111,7 +111,7 @@ const menu: ContextMenuItem[] = [
111111
},
112112
];
113113

114-
ContextMenuModel.showContextMenu(menu, e);
114+
ContextMenuModel.getInstance().showContextMenu(menu, e);
115115
```
116116

117117
---
@@ -143,7 +143,7 @@ Open a configuration file (e.g., `widgets.json`) in preview mode:
143143
- **Actions**: Use `click` for actions; use `submenu` for nested options.
144144
- **Separators**: Use `type: "separator"` to group items.
145145
- **Toggles**: Use `type: "checkbox"` or `"radio"` with the `checked` property.
146-
- **Displaying**: Use `ContextMenuModel.showContextMenu(menu, event)` to render the menu.
146+
- **Displaying**: Use `ContextMenuModel.getInstance().showContextMenu(menu, event)` to render the menu.
147147

148148
## Common Use Cases
149149

.roo/rules/rules.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ The full API is defined in custom.d.ts as type ElectronApi.
9393
- **CRITICAL** - useAtomValue and useAtom are React HOOKS. They cannot be used inline in JSX code, they must appear at the top of a component in the hooks area of the react code.
9494
- for simple functions, we prefer `if (!cond) { return }; functionality;` pattern overn `if (cond) { functionality }` because it produces less indentation and is easier to follow.
9595
- It is now 2026, so if you write new files, or update files use 2026 for the copyright year
96+
- React.MutableRefObject is deprecated, just use React.RefObject now (current is now always mutable)
9697

9798
### Strict Comment Rules
9899

0 commit comments

Comments
 (0)