Context & Skills: a collection holding only plain documents shows "No contents" and its editor can't be opened · Issue #823 · cloudflare/cloudflare-os · GitHub
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Context & Skills: a collection holding only plain documents shows "No contents" and its editor can't be opened #823
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
In Context & Skills, create a web-backed collection.
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.
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