feat(ui): add content editor components for skills and thoughts
Some checks failed
CI / build-and-test (push) Failing after -31m24s
Some checks failed
CI / build-and-test (push) Failing after -31m24s
* Implement ContentEditorField for inline editing of content * Create ContentEditorModal for editing content in a modal * Introduce FormerShell for managing forms related to skills and thoughts * Enhance SkillsPage and ThoughtsPage with new components for better content management
This commit is contained in:
@@ -63,10 +63,25 @@ func TestResolveSpecGuardAllowsSupportedMutations(t *testing.T) {
|
||||
}{
|
||||
{name: "learnings read", entity: "learnings", operation: "read"},
|
||||
{name: "projects create", entity: "projects", operation: "create"},
|
||||
{name: "projects update", entity: "projects", operation: "update"},
|
||||
{name: "projects delete", entity: "projects", operation: "delete"},
|
||||
{name: "plans create", entity: "plans", operation: "create"},
|
||||
{name: "plans update", entity: "plans", operation: "update"},
|
||||
{name: "plans delete", entity: "plans", operation: "delete"},
|
||||
{name: "learnings create", entity: "learnings", operation: "create"},
|
||||
{name: "learnings update", entity: "learnings", operation: "update"},
|
||||
{name: "learnings delete", entity: "learnings", operation: "delete"},
|
||||
{name: "thoughts create", entity: "thoughts", operation: "create"},
|
||||
{name: "thoughts update", entity: "thoughts", operation: "update"},
|
||||
{name: "thoughts delete", entity: "thoughts", operation: "delete"},
|
||||
{name: "agent_skills create", entity: "agent_skills", operation: "create"},
|
||||
{name: "agent_skills update", entity: "agent_skills", operation: "update"},
|
||||
{name: "agent_skills delete", entity: "agent_skills", operation: "delete"},
|
||||
{name: "agent_guardrails create", entity: "agent_guardrails", operation: "create"},
|
||||
{name: "agent_guardrails update", entity: "agent_guardrails", operation: "update"},
|
||||
{name: "agent_guardrails delete", entity: "agent_guardrails", operation: "delete"},
|
||||
{name: "stored_files update", entity: "stored_files", operation: "update"},
|
||||
{name: "stored_files delete", entity: "stored_files", operation: "delete"},
|
||||
}
|
||||
|
||||
for _, tc := range cases {
|
||||
@@ -100,32 +115,18 @@ func TestResolveSpecGuardBlocksUnsupportedMutations(t *testing.T) {
|
||||
wantMessageIn string
|
||||
}{
|
||||
{
|
||||
name: "create not allowed on thoughts",
|
||||
entity: "thoughts",
|
||||
name: "mutations blocked for non-allowlisted operation",
|
||||
entity: "stored_files",
|
||||
operation: "create",
|
||||
wantCode: http.StatusForbidden,
|
||||
wantMessageIn: `operation "create" is not allowed for public.thoughts`,
|
||||
},
|
||||
{
|
||||
name: "delete not allowed on projects",
|
||||
entity: "projects",
|
||||
operation: "delete",
|
||||
wantCode: http.StatusForbidden,
|
||||
wantMessageIn: `operation "delete" is not allowed for public.projects`,
|
||||
wantMessageIn: `operation "create" is not allowed for public.stored_files`,
|
||||
},
|
||||
{
|
||||
name: "mutations blocked for non-allowlisted entity",
|
||||
entity: "stored_files",
|
||||
entity: "maintenance_logs",
|
||||
operation: "delete",
|
||||
wantCode: http.StatusForbidden,
|
||||
wantMessageIn: `operation "delete" is not allowed for public.stored_files`,
|
||||
},
|
||||
{
|
||||
name: "mutations blocked for learnings",
|
||||
entity: "learnings",
|
||||
operation: "delete",
|
||||
wantCode: http.StatusForbidden,
|
||||
wantMessageIn: `operation "delete" is not allowed for public.learnings`,
|
||||
wantMessageIn: `operation "delete" is not allowed for public.maintenance_logs`,
|
||||
},
|
||||
{
|
||||
name: "unknown operation is rejected",
|
||||
|
||||
Reference in New Issue
Block a user