Context & Skills: a collection holding only plain documents shows "No contents" and its editor can't be opened · Issue #823 · cloudflare/cloudflare-os · GitHub
Skip to content

Context & Skills: a collection holding only plain documents shows "No contents" and its editor can't be opened #823

Open

Description

@breakingmind

What happens

Since the Skills Navigator replaced the Context Library landing page (#504), a collection whose documents are not skills is unusable from the UI:

  • Its row in Context & Skills shows only "No contents", although the documents are still stored.
  • Clicking the collection only expands or collapses that row. The collection editor (upload files, upload folder, edit documents) can only be opened by selecting a skill, so a collection without skills has no way in.

Before #504, the same collections listed their documents and could be opened, edited and uploaded into from the Context page.

Steps to reproduce

  1. In Context & Skills, create a web-backed collection.
  2. Upload a few Markdown or text files with no SKILL.md (on a version before Add hierarchical skills navigator #504, or through the API).
  3. Return to Context & Skills.

Expected: the collection's documents are reachable, or at least the collection can be opened to manage them.
Actual: the row shows "No contents", and clicking it does nothing beyond expand/collapse.

A newly created collection is affected too: it is empty, so it also shows "No contents", and there is no editor entry point for uploading its first documents unless they go in as a skill.

Cause

buildSkillNavigator skips every document without a skillName (packages/gatekeeper-context/app/skills/skillNavigatorModel.ts, if (!document.skillName) continue;). SkillsNavigatorTree calls onSelectSkill only for skill rows, and ContextLibraryPage opens CollectionEditor only from onSelectSkill.

I understand from app/skills/README.md that collections are moving towards holding only skills. Collections that already hold plain documents still need a way to be managed, and plain reference documents also seem like a reasonable thing to keep in Context.

Still present on main at 8060cd9.

Possible fix

We patched our deployment so that clicking a collection with no skills to show opens CollectionEditor (a new onSelectCollection prop passed from ContextLibraryPage through SkillsNavigatorPage to SkillsNavigatorTree). Collections that have skills keep their expand/collapse behaviour. An "Open collection" item in the collection's context menu would also work and would cover collections that mix skills and documents.

Question

Will plain reference documents stay supported in Context long-term, or should they all be packaged as skills going forward?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions