refactor: trim unused client surface - #1
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Refactors the client by shrinking the Rust↔UI contract surface to only what the current prototype uses, removing the previously generic backend trait seam, and aligning generated TypeScript bindings + configuration with that reduced API.
Changes:
- Removes the
ChatBackendtrait and prunes unused commands/events/types across Rust core, Tauri bridge, and generatedsrc/bindings.ts. - Implements/extends mock-only functionality for replies, edits, redaction, and reactions, including expanded Rust tests for these behaviors.
- Simplifies frontend configuration (TypeScript/Tailwind) and updates compatibility documentation to reflect the prototype-only contract.
Reviewed changes
Copilot reviewed 12 out of 16 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Simplifies TS compiler options to only what the current client uses. |
| tailwind.config.js | Reduces Tailwind config to minimal settings used by the UI. |
| src/bindings.ts | Regenerated bindings after pruning commands/events/types. |
| src/App.tsx | Adds reply/edit/delete/reaction UI flows and improves async error handling and race-safety when switching rooms. |
| src-tauri/src/lib.rs | Removes trait-based backend indirection; exposes only the remaining commands and inlines TS export config. |
| src-tauri/Cargo.toml | Drops unused serde_json dependency. |
| src-tauri/build.rs | Formatting-only change. |
| README.md | Updates project framing to clarify prototype/mock-only behavior and future Matrix replacement steps. |
| docs/DATA_INTERFACE.md | Updates contract documentation to match the reduced API/event surface and prototype scope. |
| core/src/model.rs | Removes unused session/login and membership/member types; minor formatting. |
| core/src/mock.rs | Implements reply/edit/redact/reaction behavior and adds substantial test coverage. |
| core/src/lib.rs | Removes backend trait module/re-exports and narrows public exports. |
| core/src/event.rs | Prunes events to Timeline and Typing only and removes unused event-related types. |
| core/src/backend.rs | Deletes the unused ChatBackend trait module. |
| core/Cargo.toml | Drops unused async-trait dependency. |
| Cargo.lock | Removes async-trait and serde_json from the lockfile dependency graph. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
Skipped findings
Compatibility
Checks