Skip to content

Add Sonic folder notes, note cards, recent facts and claim checks - #202

Merged
SummonShenron merged 1 commit into
mainfrom
sonic/folder-notes-and-recent-facts
Dec 1, 2026
Merged

SummonShenron merged 1 commit into
mainfrom
sonic/folder-notes-and-recent-facts

Conversation

@SummonShenron

Copy link
Copy Markdown
Owner

Adds the Sonic folder tools and note requests with their panel and card UI, recent-facts and claim-check helpers, and related test updates across the backend and frontend.

Opened with Sonic Assistant.

Adds the Sonic folder tools and note requests with their panel and card UI, recent-facts and claim-check helpers, and related test updates across the backend and frontend.

Co-authored-by: Sonic Assistant <sonic-assistant@users.noreply.github.com>
@vercel

vercel Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
saapp Ready Ready Preview Dec 1, 2026 2:21am UTC

@SummonShenron

Copy link
Copy Markdown
Owner Author

Sonic Assistant PR Overview

Summary

This PR introduces "Sonic's folder," a dedicated storage space within SAAPP for user-requested notes and conversation-specific scratch files. This change separates personal notes and throwaway development scripts from project-specific files, ensuring they are managed independently of the connected project folder.

What changed

  • Sonic Folder Logic: Added backend/utils/sonic_folder.py to manage note and scratch file lifecycles, including validation, cleanup, and storage limits.
  • Tooling & Workflow:
    • Added backend/services/sonic_folder_tools.py to handle note saving, reading, and scratch file operations.
    • Updated backend/services/agent_workflow.py to integrate new note and scratch tools into the agent's planning logic.
    • Modified backend/services/sandbox_tests.py to support mounting scratch files into the sandbox environment during test execution.
  • Frontend UI:
    • Created local/src/components/SonicFolderPanel.tsx to display and manage notes and scratch files on the Memory page.
    • Updated local/src/api.ts to include new API definitions for folder items.
  • App Integration: Updated app.py to handle note_card events and ensure scratch files are cleared when a session is deleted.

Where to look

  • backend/utils/sonic_folder.py: The core implementation of the folder logic, including the FolderError exception and data cleaning functions.
  • backend/services/sonic_folder_tools.py: The interface between the agent and the folder, specifically save_now and prepare_note_change.
  • local/src/components/SonicFolderPanel.tsx: The React component responsible for rendering the user interface for notes and scratch files.

Risks and gaps

  • Security: The save_now function in backend/services/sonic_folder_tools.py uses _flag to parse boolean inputs; ensure all inputs from the model are strictly validated.
  • Data Integrity: The save_note function in backend/utils/sonic_folder.py performs string cleaning and length checks, but relies on the caller to handle potential FolderError exceptions.

Not fully covered by this overview (diff cut short: backend/utils/sonic_folder.py, backend/services/sandbox_tests.py, backend/services/agent_workflow.py, backend/services/sonic_folder_tools.py, app.py, local/src/api.ts; not read: backend/utils/note_requests.py, local/src/components/NoteCard.tsx, local/src/components/noteCardLogic.ts, backend/utils/recent_facts.py, local/src/pages/Memory.tsx, backend/services/native_tools.py, backend/utils/sonic_notes.py, local/src/components/__styles__/NoteCard.css, ...).

Updated for commit 6582d25

@SummonShenron
SummonShenron merged commit b8c2719 into main Dec 1, 2026
2 of 4 checks passed

This branch was successfully deployed

1 active deployment
Preview — 6582d25b Deployed Dec 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants