fix(skills): read-only view mode for built-in skills - #494
Merged
Conversation
- SkillCard shows Eye icon + "View" for built-in, Pencil + "Edit" for user - SkillDialog in read-only mode: disabled fields, no toolbar on markdown editor, "View Skill" title, "Close" button, no "Update Skill" - Hide tip section in read-only mode
Contributor
Greptile SummaryThis PR adds a read-only view mode for built-in skills by introducing a Key changes:
Issues found:
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User clicks action button on SkillCard] --> B{skill.builtIn?}
B -- Yes --> C[Show Eye + View button]
B -- No --> D[Show Pencil + Edit button]
C --> E[handleEdit: fetchSkillDetail]
D --> E
E --> F[setEditingSkill / setIsDialogOpen]
F --> G[SkillDialog opens]
G --> H{readOnly = editingSkill?.builtIn}
H -- true --> I[Read-only mode]
H -- false/undefined --> J[Edit / Create mode]
I --> K[Title: View Skill]
I --> L[Inputs: readOnly=true]
I --> M[Toolbar: hidden]
I --> N[Tip section: hidden]
I --> O[Footer: Close button only]
J --> P[Title: Edit Skill / Create Skill]
J --> Q[Inputs: editable]
J --> R[Toolbar: visible]
J --> S[Tip section: visible]
J --> T[Footer: Cancel + Save button]
Prompt To Fix All With AIThis is a comment left during a code review.
Path: packages/browseros-agent/apps/agent/entrypoints/app/skills/SkillsPage.tsx
Line: 331-335
Comment:
**Missing gap between icon and text**
The refactoring to use JSX fragments removes the whitespace text node that previously provided a visual gap between the icon and label. In the original code, the newline between `<Pencil … />` and `Edit` produced a space character; the new inline fragments `<><Eye …/>View</>` and `<><Pencil …/>Edit</>` have no such whitespace, so the icon and text will render flush against each other.
Other buttons in this file (e.g. `<Plus className="mr-1.5 size-4" />`) use `mr-1.5` to create icon-to-text spacing, suggesting the `Button` component does not provide automatic gap. Add a margin or an explicit space to both variants:
```suggestion
{skill.builtIn ? (
<><Eye className="mr-1 size-3.5" />View</>
) : (
<><Pencil className="mr-1 size-3.5" />Edit</>
)}
```
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: packages/browseros-agent/apps/agent/entrypoints/app/skills/SkillsPage.tsx
Line: 486-489
Comment:
**Duplicate read-only description text**
In read-only mode, the exact same string `'This skill is managed by BrowserOS and updated automatically.'` is displayed both in the dialog header's `DialogDescription` (line 414) and again in this footer paragraph. The footer ends up repeating information the user has already seen at the top of the dialog. Consider using a shorter, distinct message in the footer — for example `'Read-only — managed by BrowserOS.'` — or omitting the footer paragraph entirely for built-in skills.
How can I resolve this? If you propose a fix, please make it concise.Last reviewed commit: "fix(skills): read-on..." |
shivammittal274
force-pushed
the
fix/skills-view-mode
branch
from
March 19, 2026 13:34
7934af1 to
764ace9
Compare
Replace MDXEditor with react-markdown for viewing built-in skills. MDXEditor chokes on code fences, angle brackets, and image syntax causing content truncation. react-markdown handles standard markdown correctly with no rendering issues.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
🤖 Generated with Claude Code