Repository navigation
Conversation
Signed-off-by: Yehor Komarov <10210242+geoolekom@users.noreply.github.com>
… chat Signed-off-by: Yehor Komarov <ekomarov@constructor.tech>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
geoolekom
force-pushed
the
soft-chat-delete
branch
from
December 3, 2026 21:54
610339d to
39de253
Compare
This branch has not been deployed
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.
Stacked on #277 (
soft-chat-delete); the base moves tomainwhen the ones below it merge.What changed
The phone now writes to the computer, and a chat of the computer can be continued on the phone.
sync-delete-chat, computer format 3 or later), then the turns of every chat that has some the computer does not hold (sync-push-chat, format 2 or later). Nothing is sent to an older computer. A push is one line of at most 15 KiB and 200 turns; a longer run goes in several pushes, each with theseenof the one before, and a turn too long for a line is split into turns of the same role a millisecond apart, as the command describes.seen, and the computer, which knows the turns it holds, stores nothing for it. A turn is not sent twice and not lost.unknown seenfor a chat started on the phone sends the chat again from its start, once in a sync. A refusal (invalid chat,time too far ahead,invalid sync request) leaves that chat and goes on with the others. Any other failure (chats unavailable,cannot save, …) stops the sending until the next sync.erasingcuts the sync, as it does for a copy being read.continued(new in the model). The chat of the computer keeps its lines, and both chats stay on the phone. A push the computer answers withdeletedstores nothing, and the phone marks the chat deleted.conversationgetsdeleted_at,delete_pendingandsent(how many lines the computer holds), andmessagegets atime. A copy made before keeps all it has: the lines of every chat the computer listed count as sent, a chat started on the phone has none sent, and old lines have no time.MigrationTestchecks it.keyNote: "Chats on the phone use your own API key. They are billed to it, apart from any subscription you have."agent/examples/phone_pairing.rsnow serves pushes and deletes with the agent's own rules, so the phone tests run against them.fork_idinagent/src/chat/from_phone.rsis madepub, so the program forks the way the agent does; nothing else changes in the agent.Not in this change
The screens still show a chat of the computer as read-only:
ChatThread.readOnlyandChatHolderare left alone. Removing that state, showing a forked chat as continued on the phone, showing the key note before the first chat and in the model setup, the build number and the simulator and emulator screenshots come in the next change.What ran
./gradlew checkinmobile/(ktlint, detekt, the shared and Android host tests, and the shared chat tests on the iOS Simulator): clean.iosApp/check.sh: clean.SyncPushTest,SyncEngineTest,PhoneChatSendTest,CopySyncTest,MigrationTestand the shared chat tests, which cover a phone chat, a turn in a chat of the computer and a delete reaching the computer once, a chat of the computer answering from its copied history, a fork leaving both chats, a cut sync, and "Delete everything".RealAgentSyncTestand the builtphone_pairingexample (CONSTRUCT_PHONE_PAIRING_EXAMPLE; skipped without it): 15 of 16 pass, including the same cases as above. The sixteenth,theFirstCopyGivesTheFactsTheChatsAndTheNumbersTheAgentServes, gets no widgets from the agent's default dashboard. This change touches neither that test nor the dashboard code.cargo fmt --all --checkandcargo clippy --locked --all-targets -p construct-agent -- -D warnings: clean.cargo test --locked --no-fail-fast -p construct-agent: all pass except two timing tests (a_request_for_a_month_answers_within_a_second, which took 1.03 s against a limit of 1 s, anda_call_that_hangs_ends_as_an_unreachable_api_does) that failed once on a busy machine and passed in two reruns on their own. The--ignoredtests were not run.pre-commit run --all-files: passes.