Skip to content

Skills: UI file editor never persists — getSkillTree/getSkillNodeContent/updateSkillNodeContent are stubs and no /api/skills/:id/tree route exists #16316

Description

@johnnydobbins

Version: v0.8.8-rc3 (also present on main at time of filing)

Summary

The Skills file editor in the UI can never persist a change. The functions it calls in data-service.ts are hard-coded stubs that never make an HTTP request, so reading a skill file returns empty content and saving is an optimistic no-op with no error.

Evidence

packages/data-provider/src/data-service.ts:

export const getSkillTree = (_skillId: string): Promise<t.TSkillTreeResponse> => {
  return Promise.resolve({ nodes: [] });
};
export const getSkillNodeContent = (_variables: { skillId: string; nodeId: string }): Promise<{ content: string; mimeType: string }> => {
  return Promise.resolve({ content: '', mimeType: 'text/plain' });
};
export const updateSkillNodeContent = (variables: { skillId: string; nodeId: string; content: string }): Promise<t.TSkillNode> => {
  // returns a synthesized node; no network call
};

packages/data-provider/src/api-endpoints.ts defines the intended route:

export const skillTree = ({ skillId, path = '' }) => `${BASE_URL}/api/skills/${encodeURIComponent(skillId)}/tree${path ? `/${path}` : ''}`;

but api/server/routes/skills.js mounts only /:id, /:id/files, /:id/files/*relativePath (GET/POST/DELETE) and /import — there is no /tree route, and a request to GET /api/skills/:id/tree/... returns 404 {"message":"Endpoint not found"}.

Reproduction

  1. Create a skill with a file (e.g. references/queries.md) via POST /api/skills/:id/files.
  2. Open it in the UI file editor (SkillFileEditor).
  3. The editor shows empty content (getSkillNodeContent returns '').
  4. Type, click Save — no request is made; the mutation resolves a fake node.
  5. Reload — the change is gone.

Expected

Reading and saving a skill file should round-trip. The working server routes already exist for this — GET /api/skills/:id/files/*relativePath (read) and POST /api/skills/:id/files (create/replace, multipart) — so the data-service functions can either call those or the /tree route can be implemented.

Impact

Skill sub-file editing is impossible from the UI; only the SKILL.md body (via PATCH /api/skills/:id) can be edited. Skills with references/ or scripts/ are read-only in practice.

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

    🐛 bugSomething isn't working🗺️ Custom Skillscodegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions