Skip to content

fix: skills repo removes hydration and polishes the whole flow - #4445

Merged
akshaydeo merged 1 commit into
devfrom
06-16-fix_skills_repo_removes_hydration_and_polishes_the_whole_flow
Jun 16, 2026
Merged

fix: skills repo removes hydration and polishes the whole flow#4445
akshaydeo merged 1 commit into
devfrom
06-16-fix_skills_repo_removes_hydration_and_polishes_the_whole_flow

Conversation

@danpiths

Copy link
Copy Markdown
Collaborator

Summary

Removes server-side hydration of inline text content for skill files and applies
a comprehensive set of UI polish fixes across the entire Skills Repository flow,
addressing layout overflow issues, scroll behavior, tree view truncation, and
form state management.

Changes

  • Removed hydrateInlineTextContent from configstore/skills.go — inline
    text content no longer needs to be hydrated from DB blobs on the server side;
    content is served via the file endpoint instead
  • Fixed layout and overflow issues across all skill views (page.tsx,
    skillDetailsView, skillCreatorView, skillListView) by replacing
    hardcoded viewport height calculations (h-[calc(100dvh-1rem)]) with flexible
    h-full layouts
  • Fixed tree view truncation in treeView.tsx — changed
    min-w-0 overflow-hidden to min-w-max so long file names and deep nesting
    are no longer clipped
  • Refactored form state initialization in skillDetailsView — replaced
    useMemo-based getSkillFormState with a plain buildFormState() function
    and updated the useEffect dependency to [skill, highestVersion] for more
    predictable form resets
  • Simplified validateField in helpers.ts — replaced switch with
    if/else chain, removed unnecessary useCallback wrapper
  • Cleaned up getPayload in the skill form hook — extracted JSON parsing
    into explicit variables for readability
  • Removed unused yamlMetadataField helper and inlined its logic in
    composeFrontmatter
  • Polished fileManagerView, filePreview, shared, skillEditForm,
    metadataEditorTableView, and versionDetailsDialog
    with layout, spacing,
    and scroll fixes throughout

Type of change

  • Bug fix
  • Feature
  • Refactor
  • Documentation
  • Chore/CI

Affected areas

  • Core (Go)
  • Transports (HTTP)
  • Providers/Integrations
  • Plugins
  • UI (React)
  • Docs

How to test

  1. Navigate to the Skills Repository page and verify the list view renders
    without vertical overflow or extra scrollbars
  2. Open a skill detail view — confirm the content fills available space
    correctly, tree view shows full file names without truncation
  3. Enter edit mode, make changes, cancel — verify form state resets cleanly to
    the original skill data
  4. Create a new skill with files and metadata — confirm the flow works
    end-to-end
  5. Open version history and version details dialog — verify layout and scroll
    behavior
# Core
cd framework/configstore
go test ./...

# UI
cd ui
pnpm i
pnpm build

Screenshots/Recordings

N/A — layout and polish changes throughout the skills repo flow.

Breaking changes

  • Yes
  • No

Related issues

N/A

Security considerations

None. The removal of hydrateInlineTextContent does not expose any new data
paths — file content continues to be served through the existing file endpoint.

Checklist

  • I read docs/contributing/README.md and followed the guidelines
  • I added/updated tests where appropriate
  • I updated documentation where needed
  • I verified builds succeed (Go and UI)
  • I verified the CI pipeline passes locally if applicable

@danpiths
danpiths requested a review from akshaydeo June 16, 2026 10:58
@akshaydeo akshaydeo mentioned this pull request Jun 16, 2026
18 tasks
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

danpiths commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@akshaydeo, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 23 minutes and 35 seconds. Learn how PR review limits work.

To continue reviewing without waiting, enable usage-based billing in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5f5e161c-e7a7-44ee-bda9-1fbfdeb8d30a

📥 Commits

Reviewing files that changed from the base of the PR and between e462f05 and 1568fa4.

📒 Files selected for processing (15)
  • framework/configstore/skills.go
  • ui/app/workspace/skills-repo/components/fileManagerView.tsx
  • ui/app/workspace/skills-repo/components/filePreview.tsx
  • ui/app/workspace/skills-repo/components/helpers.ts
  • ui/app/workspace/skills-repo/components/metadataEditorTableView.tsx
  • ui/app/workspace/skills-repo/components/shared.tsx
  • ui/app/workspace/skills-repo/components/skillCreatorView.tsx
  • ui/app/workspace/skills-repo/components/skillDetailsView.tsx
  • ui/app/workspace/skills-repo/components/skillListView.tsx
  • ui/app/workspace/skills-repo/dialogs/skillVersionDialog.tsx
  • ui/app/workspace/skills-repo/dialogs/versionDetailsDialog.tsx
  • ui/app/workspace/skills-repo/forms/skillEditForm.tsx
  • ui/app/workspace/skills-repo/forms/skillEditFormFields.tsx
  • ui/app/workspace/skills-repo/page.tsx
  • ui/components/ui/treeView.tsx
📝 Walkthrough

Walkthrough

Removes server-side inline text hydration for skill files (hydrateInlineTextContent). Refactors the skill edit form into a two-pane layout with tabbed details/metadata/extra-frontmatter selection and dedicated editor subcomponents. Introduces FileSourceEditor for multi-source-type file editing with serve endpoints. Overhauls shared read-only components to use sidebar-driven pane selection. Updates file manager with inline rename, search filtering, and name-only file creation. Refines layout and styling across list, detail, version, page, and tree components.

Changes

Backend: Remove InlineContent Hydration

Layer / File(s) Summary
Remove hydrateInlineTextContent from skill file loading
framework/configstore/skills.go
Deletes the hydrateInlineTextContent helper and its calls in GetSkillVersion and populateSkillFiles, so text-type skill files are no longer auto-populated with InlineContent server-side.

Skills Repo UI: Form Helpers & Metadata

Layer / File(s) Summary
Form helpers and metadata editor refactoring
ui/app/workspace/skills-repo/components/helpers.ts, ui/app/workspace/skills-repo/components/metadataEditorTableView.tsx
composeFrontmatter now emits metadata: as a YAML block or scalar using yamlMetadataBlock/yamlMetadataScalar. validateField and getPayload are rewritten without useCallback/inline IIFEs. MetadataTableEditor inlines JSON parse/serialize with a local handleChange callback and updated container layout. SkillFormFields uses hasKeys helper to normalize empty/null frontmatter/metadata.

Skills Repo UI: Read-Only Shared Components

Layer / File(s) Summary
Shared read-only core components: metadata, YAML, body, and tree helpers
ui/app/workspace/skills-repo/components/shared.tsx
ReadOnlyYamlBlock/ReadOnlyMetadataTable gain optional className prop; ReadOnlyYamlBlock adds flex/overflow/border styling. ReadOnlyMetadataTable introduces sticky header + scrollable body. ReadOnlySkillBody removes fullscreen expand dialog, renders "Rendered"/"Raw" tabs inline, and intercepts external links (http/https) for user confirmation. ReadOnlyFileTree adds TreeRowChevron/TreeRowIcon helper components to simplify row rendering and refines hover/action-dropdown styling.
SkillReadOnlyContent sidebar-driven pane selection
ui/app/workspace/skills-repo/components/shared.tsx
Refactors SkillReadOnlyContent from always-rendered metadata/frontmatter upfront to a sidebar-driven selection model with sentinel keys for "Metadata" and "Extra Frontmatter" panes. Conditionally renders metadata table, YAML block, file preview, or SKILL.md body based on selection. Adds optional className prop. Refactors SkillFilesSidebar collapsed-state initialization to use lazy useState initializer instead of mount-time useEffect hydration.

Skills Repo UI: File Preview & Editing

Layer / File(s) Summary
File preview and multi-source FileSourceEditor
ui/app/workspace/skills-repo/components/filePreview.tsx
Extends FilePreview/FilePreviewPane props with onFileUpdate callback. Refactors resolveSource to use serve-endpoint URLs for saved text/dataurl files while local/unsaved content uses in-memory state. Restructures text preview with FallbackBlock on fetch error and scrollable <pre> view. Introduces FileSourceEditor handling upload (blocked with message), url (text Input), dataurl (textarea or binary fallback), and text (textarea with serve fetch or inline) editing modes. Sets FilePreviewPane.isEditable = false to gate save behavior.

Skills Repo UI: File Manager

Layer / File(s) Summary
File manager add-file name-only mode and search filtering
ui/app/workspace/skills-repo/components/fileManagerView.tsx
FileAddForm distinguishes "name-only" file creation from full entry, gating source-field validation. Redesigns name-only UI with compact input and confirm/cancel buttons. FileManagerSection adds searchQuery state to filter files by path and expand folders. Removes prior full-edit tree-node kind. Adds hasBodyError prop for error-styled SKILL.md rendering.
File manager inline file rename and row actions
ui/app/workspace/skills-repo/components/fileManagerView.tsx
Adds inline rename with Enter/Escape/blur handling and path validation. Updates per-file dropdown menu labeling and state handlers. Removes full-edit state reset logic. Tweaks folder-row sticky actions and folder/file "Add from …" draft creation with consistent object literals. Updates deletion-dialog nested-files section layout.

Skills Repo UI: Edit Form Refactor

Layer / File(s) Summary
SkillDetailView form state builder and reset logic
ui/app/workspace/skills-repo/components/skillDetailsView.tsx
Removes useMemo-based form-state getter, introduces buildFormState() helper. Adds useRef-tracked lastResetSkillIdRef to avoid resetting form during same-skill edit. Dependency-driven useEffect resets form when skill/highestVersion/isEditing/skillId changes. Updates handleCancelEdit to use buildFormState(). Adjusts layout classes for "Skill not found" and main wrapper flex/min-height behavior.
SkillEditView two-pane layout and editor subcomponents
ui/app/workspace/skills-repo/forms/skillEditForm.tsx
Refactors from collapsible single "Details" to two-pane workspace: left pane with "Details/Metadata/Extra Frontmatter" tabs + file list, right pane rendering DetailsEditorPane, MetadataEditorPane, ExtraFrontmatterEditorPane, or FilePreviewPane/SKILL.md editor. Tracks selectedDetailsPane and clears file selection on tab switch. Moves file-path autocomplete into standalone buildFilePathCompletions(files) helper. Computes previewContent inline. Updates raw SKILL.md preview dialog. Extracts VersionDialogBody with validateVersionBump, canSave, Enter-key submission, and version error display.
DetailsEditorPane, MetadataEditorPane, ExtraFrontmatterEditorPane, VersionDialogBody subcomponents
ui/app/workspace/skills-repo/forms/skillEditForm.tsx
Introduces three field editor subcomponents: DetailsEditorPane renders description textarea with length counter and validation. MetadataEditorPane wraps MetadataTableEditor with change/validation wiring. ExtraFrontmatterEditorPane renders JSON CodeEditor with validation. VersionDialogBody encapsulates version input and confirm/cancel controls with version bump error and canSave computation.

Skills Repo UI: Version & Layout Updates

Layer / File(s) Summary
Version detail and version list dialog updates
ui/app/workspace/skills-repo/dialogs/versionDetailsDialog.tsx, ui/app/workspace/skills-repo/dialogs/skillVersionDialog.tsx
VersionDetailDialog removes useMemo, computes extraFrontmatter, metadata, composedSkillMd, fileEntries inline. Updates imports to make SkillFile/SkillFileEntry type-only. Reformats "Download ZIP" button JSX. Serving badge in SkillVersionsPopover updated from text-[10px] to text-xs.
Skill list view actions, empty state, and table layout
ui/app/workspace/skills-repo/components/skillListView.tsx
Removes "Edit" action from SkillActionsMenu dropdown. Refactors SortableHeader icon selection from nested ternary to explicit conditionals. Updates marketplace popover command to use font-mono. Restyles "true empty state" with updated sizing. Adjusts table column widths: first-column/version/files w-36, actions w-14, skill-name w-60 max-w-60. Removes min-h-0 from list-view container, uses w-full flex-1 flex flex-col.
Page layout simplification and tree view min-width updates
ui/app/workspace/skills-repo/page.tsx, ui/components/ui/treeView.tsx, ui/app/workspace/skills-repo/components/skillCreatorView.tsx
Removes cn import from page. Updates create-view container to h-full w-full p-0. Simplifies detail-view padding conditional. Adjusts list-view to drop 100dvh/min-h-0 and use p-4 flex layout. Updates treeView.tsx wrappers from min-w-0 overflow-hidden to min-w-max. Updates creator-view permission container from calculated height to flex items-center justify-center.

Sequence Diagram(s)

sequenceDiagram
  rect rgba(173, 216, 230, 0.5)
    Note over User,SkillEditView: Edit Pane Selection Flow
    User->>SkillEditView: clicks Details / Metadata / Extra Frontmatter tab
    SkillEditView->>SkillEditView: sets selectedDetailsPane
    SkillEditView->>DetailsEditorPane: renders (if details selected)
    DetailsEditorPane->>DetailsEditorPane: wire form.setDescription, form.validateField
    SkillEditView->>MetadataEditorPane: renders (if metadata selected)
    MetadataEditorPane->>MetadataTableEditor: display and edit metadata
    SkillEditView->>ExtraFrontmatterEditorPane: renders (if extra_frontmatter selected)
    ExtraFrontmatterEditorPane->>CodeEditor: display and edit JSON
  end
  rect rgba(144, 238, 144, 0.5)
    Note over User,ServeEndpoint: File Source Editing Flow
    User->>FileManagerView: clicks file in edit mode
    FileManagerView->>FilePreviewPane: pass file, onFileUpdate
    FilePreviewPane->>FilePreview: mode=edit
    FilePreview->>FileSourceEditor: source_type, file
    alt Text (saved)
      FileSourceEditor->>ServeEndpoint: fetch serve content
      ServeEndpoint-->>FileSourceEditor: text payload
    else URL
      FileSourceEditor->>FileSourceEditor: render url Input
      User->>FileSourceEditor: edit source_url
    else DataURL
      FileSourceEditor->>FileSourceEditor: render textarea or binary fallback
    else Text (local)
      FileSourceEditor->>FileSourceEditor: render textarea seeded from inlineText
    end
    FileSourceEditor-->>FilePreviewPane: emit onFileUpdate(updates)
  end
  rect rgba(255, 218, 185, 0.5)
    Note over User,SkillReadOnlyContent: Read-Only Pane Selection
    User->>SkillFilesSidebar: clicks Metadata / Extra Frontmatter / File
    SkillFilesSidebar->>SkillReadOnlyContent: emit selection change
    SkillReadOnlyContent->>Right-pane: render based on selectedPath
    alt Metadata
      Right-pane->>ReadOnlyMetadataTable: display
    else Extra Frontmatter
      Right-pane->>ReadOnlyYamlBlock: display
    else File
      Right-pane->>FilePreview: mode=view
    else Nothing
      Right-pane->>ReadOnlySkillBody: display rendered/raw tabs
    end
  end
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related PRs

  • maximhq/bifrost#4420: Directly contradicts this PR—skill ui/ux fixes #4420 adds hydrateInlineTextContent to populate missing InlineContent, while this PR removes that exact hydration call and helper.
  • maximhq/bifrost#4393: Overlaps by modifying shared read-only UI components including ReadOnlySkillBody and ReadOnlyFileTree styling and interaction patterns.

Suggested reviewers

  • akshaydeo
  • roroghost17

🐰 A rabbit hopped through a skill-filled grove so deep,
Where inline text hydration made secrets to keep.
Now fetch it fresh with FileSourceEditor's grace,
Two panes, tabbed selection, each field in its place!
Metadata, frontmatter, details aligned—
A woodland refactored, both tidy and kind. 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 48.84% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main changes: removal of hydration mechanism and UI polish improvements across the skills repository flow.
Description check ✅ Passed The PR description follows the template structure with all required sections completed: Summary, Changes, Type of change, Affected areas, How to test, Breaking changes, Related issues, Security considerations, and Checklist all present and filled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 06-16-fix_skills_repo_removes_hydration_and_polishes_the_whole_flow

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

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ui/app/workspace/skills-repo/components/filePreview.tsx`:
- Around line 412-425: The needsFetch condition currently allows fetching and
text-decoding for all saved dataurl types including binary data, which can
corrupt image/binary content if edited. Add a MIME type check to the needsFetch
condition that restricts the text-decoding path to only text-like files (e.g.,
checking if the MIME type starts with "text/" or specific safe types like
"application/json"). For binary dataurl files, implement an alternative path
that preserves the raw data URL without decoding through res.text(), preventing
data corruption when users interact with the textarea.

In `@ui/app/workspace/skills-repo/components/shared.tsx`:
- Around line 714-759: The span element containing item.name has min-w-0 and
truncate classes applied, which prevents horizontal scrolling and keeps long
filenames ellipsized. To enable horizontal scrolling of full filenames as
intended by the sidebar's min-w-max wrapper, remove the min-w-0 and truncate
classes from the className of the span that displays item.name, while preserving
the other utility classes like flex-1, font-mono, text-xs, and the conditional
font-medium styling for folders.

In `@ui/app/workspace/skills-repo/components/skillCreatorView.tsx`:
- Line 34: The permission-denied state container in skillCreatorView.tsx is
missing a height or flex-grow anchor that is required for the flex centering
utilities to work properly. Add a height constraint (such as h-full) or
flex-grow property (such as flex-1) to the className of the div element that
contains "flex items-center justify-center" so that the centering utilities can
properly position the message vertically within the create-view pane.

In `@ui/app/workspace/skills-repo/components/skillDetailsView.tsx`:
- Around line 90-95: The useEffect hook that populates the form state is
resetting the form on every skill or highestVersion change, which wipes out
unsaved edits when isEditing is true. Add a guard condition inside the useEffect
to check that isEditing is false before calling form.reset(state) with the
buildFormState() result. This ensures the form is only reset during initial load
or when exiting edit mode, but preserves local form state while actively
editing.

In `@ui/app/workspace/skills-repo/components/skillListView.tsx`:
- Line 423: The className for the embedded empty state container in
skillListView is using min-h-screen which forces viewport-height behavior inside
a nested workspace pane, causing unwanted vertical scroll/overflow. Replace
min-h-screen with a parent-bound sizing option such as h-full, min-h-0, or
flex-1 to preserve predictable workspace UI behavior and prevent the empty-state
path from introducing extra scrolling.

In `@ui/app/workspace/skills-repo/forms/skillEditForm.tsx`:
- Around line 211-248: Add stable data-testid attributes to interactive pane
selector buttons across two files for E2E test compatibility. In
ui/app/workspace/skills-repo/forms/skillEditForm.tsx#L211-L248, add data-testid
props to the dynamically mapped buttons (use skill-details-pane-btn and
skill-metadata-pane-btn) and to the separate Extra Frontmatter button (use
skill-frontmatter-pane-btn). Similarly, in
ui/app/workspace/skills-repo/components/shared.tsx#L896-L924, add data-testid
attributes to the corresponding read-only Metadata and Extra Frontmatter
selector elements with appropriate test IDs for navigation purposes.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c6631ddf-7864-4509-bf83-93aaf74fc05f

📥 Commits

Reviewing files that changed from the base of the PR and between 48f38b8 and e462f05.

📒 Files selected for processing (15)
  • framework/configstore/skills.go
  • ui/app/workspace/skills-repo/components/fileManagerView.tsx
  • ui/app/workspace/skills-repo/components/filePreview.tsx
  • ui/app/workspace/skills-repo/components/helpers.ts
  • ui/app/workspace/skills-repo/components/metadataEditorTableView.tsx
  • ui/app/workspace/skills-repo/components/shared.tsx
  • ui/app/workspace/skills-repo/components/skillCreatorView.tsx
  • ui/app/workspace/skills-repo/components/skillDetailsView.tsx
  • ui/app/workspace/skills-repo/components/skillListView.tsx
  • ui/app/workspace/skills-repo/dialogs/skillVersionDialog.tsx
  • ui/app/workspace/skills-repo/dialogs/versionDetailsDialog.tsx
  • ui/app/workspace/skills-repo/forms/skillEditForm.tsx
  • ui/app/workspace/skills-repo/forms/skillEditFormFields.tsx
  • ui/app/workspace/skills-repo/page.tsx
  • ui/components/ui/treeView.tsx
💤 Files with no reviewable changes (1)
  • framework/configstore/skills.go

Comment thread ui/app/workspace/skills-repo/components/filePreview.tsx
Comment thread ui/app/workspace/skills-repo/components/shared.tsx Outdated
Comment thread ui/app/workspace/skills-repo/components/skillCreatorView.tsx Outdated
Comment thread ui/app/workspace/skills-repo/components/skillDetailsView.tsx Outdated
Comment thread ui/app/workspace/skills-repo/components/skillListView.tsx Outdated
Comment thread ui/app/workspace/skills-repo/forms/skillEditForm.tsx
@akshaydeo
akshaydeo changed the base branch from 06-16-skill_ui_ux_fixes to graphite-base/4445 June 16, 2026 11:13
@akshaydeo
akshaydeo force-pushed the graphite-base/4445 branch from 48f38b8 to 55536ac Compare June 16, 2026 11:31
@akshaydeo
akshaydeo force-pushed the 06-16-fix_skills_repo_removes_hydration_and_polishes_the_whole_flow branch from e462f05 to c0f691e Compare June 16, 2026 11:31
@akshaydeo
akshaydeo changed the base branch from graphite-base/4445 to 06-16-skill_ui_ux_fixes June 16, 2026 11:31
@akshaydeo
akshaydeo force-pushed the 06-16-fix_skills_repo_removes_hydration_and_polishes_the_whole_flow branch 2 times, most recently from 868bf95 to f2784da Compare June 16, 2026 11:32

akshaydeo commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Merge activity

  • Jun 16, 11:33 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 16, 11:36 AM UTC: Graphite couldn't merge this PR because it failed for an unknown reason (Cannot update this PR because it has been closed. If this PR was closed unintentionally, reopen it and retry the merge.).

@akshaydeo
akshaydeo changed the base branch from 06-16-skill_ui_ux_fixes to graphite-base/4445 June 16, 2026 11:34
@akshaydeo
akshaydeo changed the base branch from graphite-base/4445 to dev June 16, 2026 11:35
@akshaydeo
akshaydeo force-pushed the 06-16-fix_skills_repo_removes_hydration_and_polishes_the_whole_flow branch from f2784da to 1568fa4 Compare June 16, 2026 11:35
@coderabbitai
coderabbitai Bot requested a review from roroghost17 June 16, 2026 11:36
@akshaydeo
akshaydeo merged commit a3c9651 into dev Jun 16, 2026
8 of 14 checks passed
@akshaydeo
akshaydeo deleted the 06-16-fix_skills_repo_removes_hydration_and_polishes_the_whole_flow branch June 16, 2026 11:36
@greptile-apps

greptile-apps Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 3/5

I don't think this is safe to merge yet.

  • Searching the file tree can route edits and deletes to the wrong file.

  • Some existing UI test selectors were removed or changed without matching test updates.

  • The saved text-file edit path itself appears to preserve edited content in the payload.

  • ui/app/workspace/skills-repo/components/fileManagerView.tsx

  • ui/app/workspace/skills-repo/components/shared.tsx

T-Rex T-Rex Logs

What T-Rex did

  • Traced the saved text-file edit path from FilePreviewPane in edit mode through FileSourceEditor, the serve-endpoint fetch, onFileUpdate, form.updateFile, and getPayload.
  • Created 20 targeted logic tests in trex-artifacts/file-edit-flow-test.mjs covering resolveSource routing, payload propagation, spread semantics, testid selectors, and dead code paths.
  • Ran the focused checks with a standalone Node.js script after the local test runner required a newer Node.js version.
  • All 20 focused checks passed.
  • Confirmed data-testid changed from index-based to filename-based (skill-file-actions-${basename(file.path)}), and isEditable=false makes the FilePreviewPane flush mechanism dead code, though FileSourceEditor writes directly to the form state.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "fix: skills repo removes hydration and p..." | Re-trigger Greptile

return next;
});
}, []);
};

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.

P1 Preserve original indices

When search is active, this builds the tree from filteredFiles, and buildTree assigns each row an index from that filtered array. The row actions later pass that fileIndex to handlers that operate on the full files array. If the user searches for b.txt in [a.txt, b.txt], the visible b.txt row gets index 0, so select, rename, move, or delete can affect a.txt instead.

size="icon"
className="text-muted-foreground h-6 w-6"
data-testid={`skill-file-actions-${index}`}
data-testid={`skill-file-actions-${basename(file.path)}`}

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.

P2 Keep action selector

This changes the file action test id from the previous index-based value to skill-file-actions-${basename(file.path)} without updating tests. Existing Playwright selectors like skill-file-actions-0 can no longer find the menu, and duplicate basenames in different folders now produce duplicate test ids. Please preserve the old test id, or add the new selector separately.

Suggested change
data-testid={`skill-file-actions-${basename(file.path)}`}
data-testid={`skill-file-actions-${index}`}

Rule Used: UI changes must preserve data-testid attributes us... (source)

aria-label={`Actions for ${item.name}`}
>
<Button variant="ghost" size="icon" className="h-6 w-6" aria-label={`Actions for ${item.name}`}>
<MoreHorizontal className="h-3.5 w-3.5" />

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.

P2 Restore tree test ids

The read-only file tree action buttons lost their data-testids (skill-file-row-actions and skill-files-tree-actions) without matching test updates. Playwright tests that open the file-row or root tree menus will no longer be able to locate these controls. Please keep those attributes on the triggers.

Rule Used: UI changes must preserve data-testid attributes us... (source)

@coderabbitai coderabbitai Bot mentioned this pull request Jun 25, 2026
18 tasks
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.

3 participants