Skip to content

FROM feat/420-project-endpoints TO development#460

Merged
ryaneggz merged 23 commits intodevelopmentfrom
feat/420-project-endpoints
Nov 14, 2025
Merged

FROM feat/420-project-endpoints TO development#460
ryaneggz merged 23 commits intodevelopmentfrom
feat/420-project-endpoints

Conversation

@ryaneggz
Copy link
Copy Markdown
Collaborator

@ryaneggz ryaneggz commented Oct 29, 2025

Closes #420

Summary by CodeRabbit

  • New Features

    • Project management endpoints with search and document storage
    • Math calculator tool for quick expressions
  • Bug Fixes

    • Fixed CSS class parsing in search styling
    • Adjusted chat tool message layout for clearer display
  • Chores

    • Updated branding to "Enso Labs - Orchestra"
    • Changed default AI model selection
    • Improved system prompt guidance and safety
  • Tests

    • Added project service tests; removed legacy agent repo tests

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Oct 29, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adds a per-user ProjectService and ProjectRepo with API endpoints, introduces a math calculator tool, updates branding strings to "Enso Labs - Orchestra", adjusts embeddings/store defaults and prompt/config handling, tweaks flow graph identifiers and frontend UI/style/typing, and updates tests and prompt content.

Changes

Cohort / File(s) Summary
Branding & Changelog
Changelog.md, backend/main.py, backend/mkdocs.yml
Updated titles/site name to "Enso Labs - Orchestra"; added changelog entry.
Config / Tooling
backend/pyproject.toml
Removed [tool.uv] prerelease = "allow".
Project service & repo
backend/src/services/project.py, backend/src/repos/project_repo.py
New ProjectService and ProjectRepo for per-user project document storage, CRUD, and async search; Project and ProjectSearch models added.
Context wiring & routes
backend/src/contexts/service.py, backend/src/routes/v0/__init__.py, backend/src/routes/v0/project/__init__.py
Integrated ProjectService into ServiceContext; added /projects router with POST /search and wired router into v0 routing (prompt router reordered).
Flow graph config
backend/src/flows/...
Narrowed allowed graph_id values to deepagent and react, changed default to deepagent, and updated call site to pass system_prompt instead of prompt.
LLM & tool routes
backend/src/routes/v0/llm.py, backend/src/routes/v0/tool/info.py
Switched default model to ANTHROPIC_CLAUDE_4_5_HAIKU; changed Body docs from example= to examples= for several endpoints.
Database & memory services
backend/src/services/db.py, backend/src/services/memory.py
Added DEFAULT_EMBED and DEFAULT_FIELDS; updated get_store_db signature (embed, dims, fields); replaced IN_MEMORY_STORE singleton with get_store_in_memory() default.
Search tools
backend/src/tools/search.py, frontend/src/components/menus/BaseToolMenu.tsx
Added math_calculator tool (with input validation) and registered it in SEARCH_TOOLS; added math_calculator to frontend DEFAULT_AGENT_TOOLS.
Formatting util
backend/src/utils/format.py
init_system_prompt now accepts config: RunnableConfig and extracts metadata/language to include LANGUAGE in prompt.
Prompts content
backend/src/static/prompts/md/default.md
Substantial editorial rewrite of system guidance, structure, and safety/fail-safety instructions.
Prompt route minor edits
backend/src/routes/v0/prompt/__init__.py, backend/src/routes/v0/prompt/revision.py
Replaced example= with examples= and removed an unused import.
Frontend text/style/markup
frontend/src/components/cards/MarkdownCard.tsx, frontend/src/components/lists/ChatMessages.tsx, frontend/src/components/tools/SearchEngine.tsx, frontend/src/components/sections/*
Styling/text updates: anchor color change, tool-message layout adjustment, fixed Tailwind spacing, and updated "Powered by" strings.
Frontend typing & hooks
frontend/src/hooks/useChat.ts, frontend/src/lib/services/threadService.ts
Replaced metadata mutation with getMetadata() enrichment; relaxed StreamThreadPayload.metadata typing to any.
Tests
backend/tests/__init__.py, backend/tests/unit/repos/test_agent_repo.py, backend/tests/unit/services/test_project_service.py
Added get_test_user() helper and adjusted token parsing; removed test_agent_repo.py; added test_project_service.py (skipped vector search test).
Other
backend/tests/*, various small edits
Minor documentation and example metadata updates across endpoints and tests.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant Frontend
    participant API as /projects/search
    participant ServiceContext
    participant ProjectService
    participant Store

    User->>Frontend: Submit search
    Frontend->>API: POST /projects/search (ProjectSearch)
    API->>API: verify_credentials(), get_store()
    API->>ServiceContext: instantiate with user_id, store
    ServiceContext->>ProjectService: create/use project_service
    alt filter.id provided
        API->>ProjectService: get_doc(project_id, id)
        ProjectService->>Store: get(namespace, key)
        Store-->>ProjectService: Document
    else
        API->>ProjectService: search_docs(query, filter, limit, offset)
        ProjectService->>Store: asearch(namespace, query, filter, limit, offset)
        Store-->>ProjectService: [SearchItem...]
    end
    ProjectService-->>API: Project(s)
    API-->>Frontend: { projects: [...] }
    Frontend-->>User: Render results
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

  • Areas to focus on:
    • ProjectService & ProjectRepo correctness: namespace scoping, async store usage, error handling.
    • Flow graph changes: parameter rename (system_prompt) and default graph_id change impacts.
    • init_system_prompt and config/metadata flow: language extraction and downstream expectations.
    • Tests: removal of agent repo tests and added project tests—ensure coverage maintained.
    • Type relaxation in threadService and metadata handling in useChat: potential runtime typing issues.

Poem

🐰 I hop through branches, code in paw,
Projects tucked in burrows, neat and raw,
A calculator tumbles, prompts now bright,
Enso Labs Orchestra hops into night. ✨


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Free

📥 Commits

Reviewing files that changed from the base of the PR and between 6c2bb0e and 35fdc95.

📒 Files selected for processing (2)
  • backend/src/static/prompts/md/default.md (2 hunks)
  • backend/src/utils/format.py (1 hunks)

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands and usage tips.

@ryaneggz ryaneggz marked this pull request as ready for review November 14, 2025 05:21
@ryaneggz ryaneggz merged commit 68cae4c into development Nov 14, 2025
3 of 4 checks passed
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.

FEAT: Create "Projects" endponts

1 participant