Repository navigation
Refine the maintenance chat and add saved conversations - #5
Merged
Merged
Conversation
added 4 commits
November 4, 2026 22:43
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved save races can lose or silently overwrite messages, while manual-selection bugs and Windows asset failures disrupt core workflows.
9 open issues
Handle Windows path separators when stripping revision prefixes · New Read the saved chat before releasing the write transaction · New Prevent deleting the active manual during pending or failed saves · New Check whether the manual switch succeeded before reporting success · New Increase the evidence disclaimer's text contrast · New Increase the configuration note's text contrast · New Disable retry while a question, upload, or save is in progress · New Clear deleted manual selections when starting a new chat · New Allow users to discard chats that cannot be saved · New
What changed in this PR
This PR adds saved conversations to Mantis’s maintenance workspace, separates chat history from equipment manuals, and refines the workspace and landing-page experience.
Changes:
- Add workspace-scoped chat persistence, reopen/continue/delete actions, revision checks, and storage limits without retaining personal photo files.
- Refresh the chat layout and add scrollable landing-page examples with inline sources.
- Introduce shared asset revisions and cache revalidation, with expanded regression coverage, package checks, and documentation.
| File | Description |
|---|---|
tests/test_app.py |
Add saved-chat, cache, revision, isolation, and limit regressions. |
tests/frontend/conversation.test.mjs |
Cover transcript archiving, context restoration, and example responses. |
scripts/check_package.py |
Extend wheel smoke checks to new modules and saved chats. |
README.md |
Update usage, retention details, screenshots, and coverage counts. |
mantis/web/pages/workspace.html |
Add chat drawer and revise toolbar, composer, and retention copy. |
mantis/web/pages/index.html |
Replace static preview with interactive inline examples. |
mantis/web/js/workspace.js |
Integrate chat saving, listing, reopening, continuation, and deletion. |
mantis/web/js/product-preview.js |
Append scripted examples with expandable source notes. |
mantis/web/js/examples.js |
Add vibration and overheating scenarios and source notes. |
mantis/web/js/conversation.js |
Restore bounded text history and invalidate pending replies. |
mantis/web/js/chat-history.js |
Select persisted transcript fields and omit personal photo bytes. |
mantis/web/css/workspace.css |
Refine responsive chat, drawer, toolbar, and composer styling. |
mantis/web/css/tokens.css |
Make font URLs relative to revisioned stylesheets. |
mantis/web/css/product.css |
Style the revised hero and scrollable interactive preview. |
mantis/web/assets/README.md |
Document shared scenario data and inline source expansion. |
mantis/store.py |
Add workspace-scoped SQLite chat storage and revision checks. |
mantis/middleware.py |
Apply request-body limits to chat saves. |
mantis/frontend.py |
Generate shared asset revisions and handle revisioned static paths. |
mantis/api.py |
Add saved-chat validation and endpoints, plus cache controls. |
docs/verification.md |
Record expanded automated coverage and browser checks. |
docs/running.md |
Add reload guidance for stale frontend assets. |
docs/configuration.md |
Document chat retention and storage limits. |
docs/assets/README.md |
Update the workspace screenshot description. |
docs/architecture.md |
Explain saved-chat behavior and frontend revision handling. |
docs/api.md |
Document saved-chat endpoints, payloads, and limits. |
docs/about.md |
Add saved conversations to the feature overview. |
Review effort: Max
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Mantis now separates equipment documents from conversation history: the top manual picker lists uploaded manuals, while the left rail opens Your chats. Completed exchanges are saved in workspace-scoped SQLite, can be reopened and continued, and can be deleted from the drawer. Restoring a chat reinstates its manual/example context and the last four text exchanges; personal photo files are not stored. Stale revisions, workspace boundaries, transcript/body limits, and quotas protect chat storage. A removed manual leaves its chat readable but blocks continuation under that missing context.
The interface follows the original recording: original logo, black background, narrow rail, orange user messages, compact replies, and a simple Send composer. The empty app says “Upload a manual to start”; upload/helper controls are contained within the bottom bar. The landing page keeps its full-screen black hero with a gradient only on “ON AUTOPILOT.”, a concise workflow, and suggested questions below one scrollable inline demo transcript. Example clicks append exchanges rather than replacing previous answers; sources expand on the same page.
Chrome asset mismatches are fixed with a shared content revision for CSS/modules and cache revalidation. Updated documentation, data-retention copy, screenshots, and built-wheel smoke checks reflect the final behavior.
Review fixes keep saved revision responses inside the write transaction, handle Windows asset separators, coordinate manual changes/deletion with pending or failed saves, prevent retry/follow-up races, clear missing manual context on reset, and allow confirmed discard after permanent save failures. Helper text has higher contrast and a larger minimum size. Targeted regressions cover these paths.
Validation: 48 Python tests and 20 frontend tests pass locally, plus syntax, Ruff and formatting checks. Browser checks cover desktop/mobile layout, inline demo retention, source expansion, composer containment, saved-chat persistence/reopen/continue, and separate manual/chat drawers. No application console errors or external AI calls observed. CI also verifies the built Python wheel and saved-chat API. Live model behavior remains unverified without a valid key.
Intentionally left unmerged for owner review.