Skip to content

Multiple bugfixes and improvements to layer's files in the UI#34

Open
javisperez wants to merge 5 commits intomainfrom
pull-prune-fixes
Open

Multiple bugfixes and improvements to layer's files in the UI#34
javisperez wants to merge 5 commits intomainfrom
pull-prune-fixes

Conversation

@javisperez
Copy link
Copy Markdown
Collaborator

This pull request introduces major improvements to the ModelKit UI, focusing on enhanced export functionality, improved copy actions, and clearer display of model kit information. The changes add contextual export and copy buttons to various tabs, improve user feedback during export operations, and provide better fallback display names for model kits with missing names.

Key changes include:

Export and Copy Functionality Enhancements

  • Added contextual "Export" and "Copy" buttons to the CodeTab.vue, DatasetsTab.vue, DocsTab.vue, ModelTab.vue, and PromptsTab.vue components, allowing users to easily export or copy paths and commands for individual items. The export buttons provide loading feedback and are disabled during ongoing exports. ([[1]](https://github.com/kitops-ml/kitops-desktop/pull/34/files#diff-edf6080603f4df2661020137f9353f2b3ec53aadde28625405154f125c5e35bcR4-R9), [[2]](https://github.com/kitops-ml/kitops-desktop/pull/34/files#diff-edf6080603f4df2661020137f9353f2b3ec53aadde28625405154f125c5e35bcR22-R25), [[3]](https://github.com/kitops-ml/kitops-desktop/pull/34/files#diff-edf6080603f4df2661020137f9353f2b3ec53aadde28625405154f125c5e35bcL31-R57), [[4]](https://github.com/kitops-ml/kitops-desktop/pull/34/files#diff-edf6080603f4df2661020137f9353f2b3ec53aadde28625405154f125c5e35bcL57-R99), [[5]](https://github.com/kitops-ml/kitops-desktop/pull/34/files#diff-ce28e4cb9e3330e9ab595a84e163e817ffde79e061865b5041981938775d7c8eR2-R59), F5ac73caL16R19, F5ac73caL28R33, [[6]](https://github.com/kitops-ml/kitops-desktop/pull/34/files#diff-8b74b49d97d861e38cc092187c7a982bc733ace05b055be5b896164b8a47cc0bR2-R43), [[7]](https://github.com/kitops-ml/kitops-desktop/pull/34/files#diff-532a7efc0432c14655009b24087efc9555e888a4a939d63958ceadff7ddbac60R4-R9), [[8]](https://github.com/kitops-ml/kitops-desktop/pull/34/files#diff-532a7efc0432c14655009b24087efc9555e888a4a939d63958ceadff7ddbac60R22-R25), [[9]](https://github.com/kitops-ml/kitops-desktop/pull/34/files#diff-532a7efc0432c14655009b24087efc9555e888a4a939d63958ceadff7ddbac60L31-R57), [[10]](https://github.com/kitops-ml/kitops-desktop/pull/34/files#diff-3013d0eb051fa29fd69fcb802056c4e26ed48a4528806fb396e25fead4c22822R2-R43))
  • Updated the CopyButton.vue component to support a compact mode for use in tight UI spaces. ([[1]](https://github.com/kitops-ml/kitops-desktop/pull/34/files#diff-0bc4b2790810db7caf8a774a6d63550d7b7bf211873c11822896928d72fc32dfR11), [[2]](https://github.com/kitops-ml/kitops-desktop/pull/34/files#diff-0bc4b2790810db7caf8a774a6d63550d7b7bf211873c11822896928d72fc32dfR20), [[3]](https://github.com/kitops-ml/kitops-desktop/pull/34/files#diff-0bc4b2790810db7caf8a774a6d63550d7b7bf211873c11822896928d72fc32dfR37-R45))

ModelKit Display Improvements

  • Improved the display of ModelKit names in ModelKitCard.vue by showing the repository name in italics as a fallback when the package name is missing, with a tooltip explaining the fallback. ([[1]](https://github.com/kitops-ml/kitops-desktop/pull/34/files#diff-29377979f31be70353f89dc3b307a73708b693300a1507e6b811a38d73023aacR29-R37), [[2]](https://github.com/kitops-ml/kitops-desktop/pull/34/files#diff-29377979f31be70353f89dc3b307a73708b693300a1507e6b811a38d73023aacL70-R84))

Backend Command Handling

  • Updated the IPC handler for removing all kits to use a new parameter structure, ensuring correct command invocation with support for the force flag. ([electron/ipc/kit-commands.jsL56-R56](https://github.com/kitops-ml/kitops-desktop/pull/34/files#diff-613aec223a5a94110778f062385d98a713f75eb338783b84858325e10a6a0ca4L56-R56))

These changes collectively make the ModelKit management UI more intuitive, responsive, and informative for users.

@javisperez javisperez requested review from amisevsk, Copilot and gorkem May 5, 2026 18:55
@javisperez javisperez self-assigned this May 5, 2026
@javisperez javisperez changed the title Pull prune fixes Multiple bugfixes and improvements to layer's files in the UI May 5, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the ModelKit detail UI by adding contextual copy/export actions for individual layer items (model/code/datasets/docs/prompts) and improves a few related UX details (pull/prune behavior and display names).

Changes:

  • Added per-item “Copy path”, “kit unpack …” copy, and “Export” actions across ModelKit detail tabs via a shared useLayerExport composable.
  • Updated ModelKit cards to show a clearer fallback name when the package name is missing.
  • Adjusted IPC and store calls around pull/prune command invocation and parameter passing.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/views/ModelKitDetailView.vue Computes/passes a reference into detail tabs and adjusts modal/flyout placement.
src/views/HomeView.vue Ensures Pull button calls injected openPullModal() without passing the click event.
src/stores/kitStore.ts Updates pull invocation to pass { reference, flags } in a single options object.
src/composables/useLayerExport.ts Introduces shared layer export flow (directory picker + unpack + notifications).
src/components/modelkits/CodeTab.vue Adds contextual copy/export controls for code layer entries.
src/components/modelkits/DatasetsTab.vue Adds contextual copy/export controls for dataset layer entries.
src/components/modelkits/DocsTab.vue Adds contextual copy/export controls for docs entries and “Open URL” for http(s) paths.
src/components/modelkits/ModelTab.vue Adds contextual copy/export controls for model + model part entries.
src/components/modelkits/PromptsTab.vue Adds contextual copy/export controls for prompt entries.
src/components/ModelKitCard.vue Adds computed display name fallback (repository segment) with tooltip/italic styling.
src/components/CopyButton.vue Adds a compact rendering mode for CopyButton.
electron/ipc/kit-commands.js Updates kit:removeAll handler to invoke remove with { all: true } (+ optional force).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/CopyButton.vue Outdated
Comment thread src/composables/useLayerExport.ts
javisperez added 3 commits May 5, 2026 15:01
Replace kit:removeAll handler to call kitops.remove('', { all: true, ...(force ? { force: true } : {}) }) so removal uses the unified remove API and conditionally forwards the force flag. Update kit.pull invocation to pass flags inline with the reference ({ reference, flags }) so registry TLS flags are forwarded correctly. Also fix HomeView button click to invoke openPullModal() (add parentheses) to ensure the method is executed.

Signed-off-by: Javis V. Pérez <javisperez@gmail.com>
Introduce a layer export flow and compact copy UI across modelkit detail tabs.

- Add useLayerExport composable to prompt for a directory and call kit.unpack with a filter, tracking exportingFilter and showing notifications on success/failure.
- Add compact mode to CopyButton and use it for inline copy actions (paths and prebuilt "kit unpack" commands).
- Add per-item Export buttons (with spinner and disabled state while exporting) to Code, Datasets, Docs, Model and Prompts tabs; include an external-link opener for docs URLs.
- Compute a reference (repository:tag) in ModelKitDetailView and pass it to the tabs so export/unpack commands work.
- Improve ModelKitCard displayName logic to fall back to the repository segment when name is missing, showing it in italic and with a tooltip.
- Minor template/layout tweaks and icon imports to support the new UI.

These changes enable users to export individual kit layers and quickly copy paths or unpack commands from the detail view.

Signed-off-by: Javis V. Pérez <javisperez@gmail.com>
Set an explicit label="Copy path" on CopyButton instances across modelkit tabs (CodeTab, DatasetsTab, DocsTab, ModelTab, PromptsTab) to improve consistency and accessibility. No behavior changes beyond adding the label prop; kit unpack buttons remain unchanged.

Signed-off-by: Javis V. Pérez <javisperez@gmail.com>
javisperez added 2 commits May 5, 2026 15:07
Signed-off-by: Javis Pérez <javis@jozu.com>
Signed-off-by: Javis Pérez <javis@jozu.com>
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.

2 participants