Skip to content

[WIP] Opto demo - #2337

Open
aarondr77 wants to merge 16 commits into
devfrom
opto-demo
Open

aarondr77 wants to merge 16 commits into
devfrom
opto-demo

Conversation

@aarondr77

@aarondr77 aarondr77 commented May 25, 2026

Copy link
Copy Markdown
Member

Description

Demo features :) Don't merge right now.

Testing

Documentation

Note if any new documentation needs to addressed or reviewed.


Note

Medium Risk
Touches agent response schema (analysis_assumptions, new tool) and new persisted verified-report files/APIs; behavior is additive but incorrect assumptions UI could mislead users about analysis choices.

Overview
Adds verified reports so teams can store annotated code snippets under ~/.mito/verified_reports/ and the agent can load them via a new read_verified_report tool, cite reused code with verified_snippet_ref / [MITO_VERIFIED_SNIPPET:…] in prompts, and surface reports through new REST routes under mito-ai/verified-reports.

Agent & prompts: analysis_assumptions is now structured (selected, options, evidence) instead of plain strings. Chat context can include document_comment_thread so follow-up work can reference prior document review Q&A.

Document review: New comment_instant_answer completion type streams short, ephemeral answers to code/output review comments without writing to chat history (runs in parallel with the agent).

Demos & sample data: Fund-allocation demo (IPS vs portfolio, verified fund-allocation-report.json, notebook + Streamlit app), retention demo/README and Streamlit tweaks (direct CSV load, layout), plus ancillary sample CSVs/notebooks for portfolio/LP scenarios.

Reviewed by Cursor Bugbot for commit c352cfe. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented May 25, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
monorepo Ready Ready Preview, Comment Jun 11, 2026 5:27pm

Request Review

Lux Capital Fund VII,Modal Labs,0.32
Lux Capital Fund VII,Daytona,0.18
Coatue Early Stage Fund III,Anthropic,0.84
Coatue Early Stage Fund III,Cognition,0.58

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Demo CSV files duplicated at package root

Low Severity

Four CSV demo data files (client_indirect_exposure.csv, client_lp_positions.csv, lattice_iv_co_investors.csv, lattice_iv_portfolio.csv) are committed at the mito-ai/ package root in addition to the identical-named files in mito-ai/opto-demo/. The root-level copies have fewer columns (missing entry_round, entry_valuation_musd, post_money_valuation_musd) and are not referenced by any code. These look like leftover working-directory artifacts from developing the opto demo.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 46666d1. Configure here.

* Distributed under the terms of the GNU Affero General Public License v3.0 License.
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Google Fonts request fires for all Mito themes

Medium Severity

The @import url('https://fonts.googleapis.com/css2?...') in opto.css fires for every Mito theme user, not just Opto. theme.css unconditionally imports opto.css, and all three themes (Mito Light, Mito Dark, Opto) load the same CSS file via manager.loadCSS(style). This adds an unnecessary external network dependency and latency for Mito Light and Mito Dark users, and will cause timeouts in air-gapped or restricted-network environments.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 46666d1. Configure here.

Comment thread mito-ai/mito-app-20fd0da93ee5.py
Lux Capital Fund VII,Modal Labs,0.32,Series A,180
Lux Capital Fund VII,Daytona,0.18,Seed,35
Coatue Early Stage Fund III,Anthropic,0.84,Series E,40000
Coatue Early Stage Fund III,Cognition,0.58,Series A,2000

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate demo data in three separate directories

Low Severity

The opto demo data files are duplicated identically across mito-ai/opto-demo/ and mito-ai/demos/opto-demo/ (same schema, same data). This creates a maintenance burden where changes to the demo data need to be made in multiple places. One of these directories appears to be redundant.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 77ad6e8. Configure here.


As a follow up, you can select some data in the default dataframe output and ask "Explain what a churned customer is vs a active customer" No newline at end of file
As a follow up, you can select some data in the default dataframe output and ask "Explain what a churned customer is vs a active customer"
>>>>>>> dev

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unresolved merge conflict markers committed in README

High Severity

The file contains unresolved git merge conflict markers (<<<<<<< HEAD, =======, >>>>>>> dev). The entire README is broken and will render as garbled text with conflict markers visible to anyone reading the documentation.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 63ce3f7. Configure here.

Comment thread mito-ai/src/Extensions/VerifiedReports/VerifiedIndicatorPlugin.ts
Comment thread mito-ai/src/Extensions/VerifiedReports/VerifiedIndicatorPlugin.ts Outdated
.stMainBlockContainer {padding: 2rem 1rem 2rem 1rem;}
.stMainBlockContainer {padding: 2rem 4rem 2rem 4rem;}
max-width: 1400px;
margin: 0 auto;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid CSS rules in Streamlit

Medium Severity

In the injected <style> block, max-width: 1400px and margin: 0 auto sit at the stylesheet root instead of inside a selector (for example .stMainBlockContainer), so browsers ignore them and the intended centered wide layout never applies.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit bc712a9. Configure here.

)
# Load data from CSV files
subscriptions_df = pd.read_csv('subscriptions.csv')
customers_df = pd.read_csv('customers.csv')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Demo CSV paths need cwd

Medium Severity

The Streamlit demo now always calls pd.read_csv('subscriptions.csv') and pd.read_csv('customers.csv') relative to the process working directory. The previous file-upload flow worked from any launch directory; running the app elsewhere raises FileNotFoundError and the demo fails immediately.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit bc712a9. Configure here.

)

sanitized_name = report_name.strip()
report = get_verified_report(sanitized_name)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tool errors crash agent loop

High Severity

read_verified_report calls get_verified_report without handling failures from path sanitization (ValueError) or invalid JSON on disk (JSONDecodeError). Those propagate through _execute_tool, which has no surrounding try/except, and can abort the agent run instead of returning a failed ToolResult.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit bc712a9. Configure here.

"name": report.get("name", report_name),
"description": report.get("description", ""),
"snippet_count": len(snippets),
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrupt report breaks listing

Medium Severity

get_all_verified_reports wraps the directory walk in try/except OSError only, but _load_report can raise JSONDecodeError on a damaged .json file. One bad file then fails the whole listing, including system prompt formatting and “available reports” error text.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit bc712a9. Configure here.


if tool_result.tool_name == "scratchpad" and tool_result.success and tool_result.output:
content = tool_result.output
elif (

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Legacy assumptions break parsing

Medium Severity

analysis_assumptions is now a list of structured objects in AgentResponse, but parse_agent_response still passes LLM JSON straight into Pydantic with no coercion, so legacy string lists (or other shapes the frontend already normalizes) trigger validation errors and the malformed-response retry path.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 04aa497. Configure here.

// Persisted instant-answer threads open the thread card
if (metadataThread) {
openThreadCard(app, notebookTracker, cell.model, metadataThread, rect);
return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Output threads ignore extras

Medium Severity

Document-mode output comment indicators store only the first persisted thread per cell, so clicking the indicator always opens that thread even when additional output comment threads exist on the same cell.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit de10027. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 11 total unresolved issues (including 10 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c352cfe. Configure here.

else:
location = f"Cell {cell_number}, lines {start_line}-{end_line} (0 indexed)"
else:
location = f"Cell {cell_number} output"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code thread mislabeled as output

Medium Severity

When formatting document_comment_thread context, a thread with type code but missing startLine is described as “Cell N output” instead of a code comment, so the agent can misread code discussions as output-only review threads.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c352cfe. Configure here.

@aarondr77 aarondr77 changed the title Opto demo [WIP] Opto demo Jun 12, 2026
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.

1 participant