Commits
Marek Vsechovsky committed d4cb0fea326
Session 167, Step 1: New "Project memory" Settings side tab with document browser modeled on Coding conventions
- AIM-3165 New "Project memory" Settings side tab with document browser modeled on Coding conventions
- AIM-3166 Project memory documents default to Preview mode with warning dialog before manual editing
- AIM-3167 New Settings tab: repository of service integration prompts (Platform integrations)
- AIM-3168 New "Integration prompts" document type excluded from Coding conventions, loaded only into Platform integrations
- AIM-3169 Extend DocumentGroup with DocumentGroupParentId for multi-level prompt folders
- AIM-3175 Platform integrations folder tree: chevron expand/collapse, indented children, "(no content found)" row
- AIM-3176 Integration prompt ownership limited to Public, Organization and User (no Project)
- AIM-3177 Add UserStoryFromDocId column to UserStory table
- AIM-3178 "Create integration story" button in Platform integrations tab creates story from selected document
- AIM-3179 Wf S2 "Use predefined integration prompt" button opens Platform integrations with Cancel round-trip
Outcome:
Both new Settings tabs are implemented end-to-end.
**Project memory (issue -3767, -3768):**
- New side tab after **Host instructions** with the Coding-conventions-style detail panel, description paragraph, and a stripped document browser (title *Project memory document browser*) that lists `README.md` first, separated by a bottom border from the remaining alphabetically sorted files — without tabs, create/remove buttons, document settings or the filter box.
- New `GET/PUT /api/settings/project-memory/...` endpoints read and write the top-level `.aisman/project-memory/` files (path-traversal guarded).
- Documents always open in **Preview** mode; the **Edit** button shows the AI-maintained-memory warning dialog before allowing manual edits, with Save/Cancel dirty handling wired into the settings unsaved-changes guard.
**Integration prompts (issues -3769 … -3776):**
- New **Integration prompts** settings tab: two-column detail with a read-only preview of the selected prompt on the left and a multi-level folder tree on the right (chevron-right/chevron-down expansion on chevron click or title double-click, depth-indented children, dim *(no content found)* rows, only top-level folders listed initially).
- DB script `134_AddIntegrationPromptSupport.sql` applied and verified: `DocumentGroup.DocumentGroupParentId` (+ self FK), `UserStory.UserStoryFromDocId`, and `DocumentType` row *Integration prompts* (id 6); conventions loading excludes the type via the new `excludeTypeIds` parameter and filtered type dropdowns.
- Ownership of any prompt is settable by anyone to **Public / Organization / User** through the new `PUT /api/documents/{id}/ownership` endpoint (no Project scope).
- **Create integration story** creates a Wf S2 story filled with the selected document's content and stores its `DocId` in `UserStoryFromDocId`.
- Wf S2 with no story selected shows **Use predefined integration prompt** instead of the link-session label, which opens the tab with a **Cancel** button that returns to Wf S2; leaving the Settings main tab hides Cancel again.