feat(console): resource edit flows + memory API parity and timeline/SPA fixes - #154
feat(console): resource edit flows + memory API parity and timeline/SPA fixes#154TechxTry wants to merge 2 commits into
Conversation
Enable in-console editing for agents, sessions, vaults, and memory stores; complete main-node memory HTTP routes to match apps/main; and fix tabs layout, timeline freezes on long sessions, and SPA fallback swallowing API paths. Closes openma-ai#153 Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Thanks for tackling these self-host and Console gaps. The direction looks useful, and the verify check is green. I found a few issues that should be fixed before merging:
- Agent model configuration is lossy in
agentToForm: an existing{ id, speed }model is reduced to the id string, so a name-only edit silently dropsspeed. - Form-mode updates rebuild and replace the entire
toolsarray. Existing custom tools or toolsets that the form does not understand are deleted, and switching Form to YAML or JSON serializes the reduced state. Please preserve unrecognized entries and merge only the form-managed toolsets. TurnCardonly readsdefaultExpandedduring theuseStateinitializer. When a live new turn is appended, the previously latest keyed card remains expanded, so waterfalls accumulate and the long-session performance problem returns.Event.tsis an ISO string, buteventTsMsonly accepts a number whenprocessed_atis absent, producing incorrect zero durations.
Please add focused regression coverage for editing an existing agent with non-default model or tool configuration and for appending turns to a live Timeline.
Dismissed because this review was submitted prematurely and did not reflect a completed review.
|
One more clarification on the Agent edit scope: existing agent configs can already contain fields that this form does not model, such as I do not think #154 needs to add UI for every AgentConfig field. For this PR, the update path should be lossless: preserve unsupported fields and merge only the fields actually managed by the form. Please add a round-trip regression test for that behavior. I opened #155 to track complete, full-field AgentConfig editing in Console, including the full MCP |
|
One issue with the Timeline optimization: TurnCard initializes collapsed from defaultExpanded only once. When a new turn is appended, the previous latest card keeps its expanded state while the new latest card also mounts expanded. Keeping the Timeline tab open therefore accumulates expanded waterfalls over time and can reintroduce the long-session freeze this change is meant to prevent. Could we make latest-turn expansion controlled while preserving explicit user overrides, and add a regression test that appends several turns and verifies only the latest auto-expanded turn remains open? Clearing the selection when switching sessions or threads would also be helpful, but the auto-expansion issue is the main blocker. |
Address PR openma-ai#154 review: preserve unsupported AgentConfig fields on form updates, keep only the latest timeline turn auto-expanded, parse ISO event timestamps, and map vault badges to API name. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Thanks for the review — addressed in 470becd:
Added regression tests for agent round-trip, live Timeline append, |
|
I found one remaining lossless-edit edge case: MCP servers are matched back to the preserved config by the editable Could we carry the original name or another stable row identity through form state, use it to find the preserved MCP server/toolset, and then write the new name? A regression test for renaming a stdio MCP while preserving both the stdio config and the existing tool policy would cover this. |
Summary
packages/http-routesmemory: store update/archive/delete, memory update/delete, versions + redact — aligned withapps/mainand Anthropic-shaped responsescontent-visibility, cap side-panel JSON to avoid freezes on long sessionsindex.htmlfallback skips/v1,/auth,/health, etc. so missing API routes return JSON instead of HTMLCloses #153
Test plan
PUT/POST /v1/memory_stores/:id, archive, delete; memory PATCH/POST/DELETE;memory_versionslist/get/redact/v1/...on main-node → JSON error, notUnexpected token '<'Made with Cursor