PDChat: let a conversation be un-archived (fixes #121) - #122
Merged
Conversation
MS-25789, un-archive slice. IChatConversationService.UnarchiveAsync has existed since #108 and nothing anywhere called it, so a user who archived the wrong conversation could see it - by including archived conversations in the list - and had no way to get it back. An archive with no way back is a delete wearing a different name, which is the one thing this feature promises never to do. Resolves a contradiction between two specifications, only one of which could be built. ChatConversation.IsArchived said interacting with an archived conversation should un-archive it; MS-25789 says the toolbar carries an un-archive control shown only when the current conversation is archived. If opening auto-un-archives, an open conversation is never archived and the control can never appear. MS-25789 wins, and not only for being newer: auto-un-archiving on open makes the archived filter self-defeating, because merely looking at an archived conversation drags it back into the default list - you could never browse your archive without destroying it. The IsArchived remark is corrected here, recording what it used to claim and why that changed, so the next reader does not reintroduce it. Hidden rather than disabled when the conversation is not archived: MS-25789's own stated exception to its otherwise "disable with a reason" rule, because un-archiving something never archived is meaningless rather than unavailable. Archiving closes the tab; un-archiving deliberately leaves it open, since the user has just said they want that conversation back. Verified in a browser, the whole journey: archive hides it, ticking Include archived reveals it, opening it leaves it archived, the control appears, using it removes the control, the tab stays open, and with Include archived unticked the conversation is back in the default list - which is the check that proves the store changed rather than only the component. Five bUnit tests; red-checked by stubbing out the UnarchiveAsync call, which fails the one that asserts on the store. 473 tests pass; Release build clean. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| BestPractice | 6 medium |
🟢 Metrics 1 duplication
Metric Results Duplication 1
AI Reviewer: run a review on demand. To trigger the first review automatically, go to your organization or repository integration settings. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
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.
Closes #121. Jira: MS-25789 (un-archive slice).
UnarchiveAsynchas existed since #108 and nothing called it. Archive was effectively one-way in the UI — and an archive with no way back is a delete wearing a different name, which is the one thing this feature promises never to do.A contradiction I had to resolve
ChatConversation.IsArchived(from PDChat: model a conversation as a first-class object #102): "Interacting with an archived conversation is expected to un-archive it."Mutually exclusive — if opening auto-un-archives, an open conversation is never archived and the control never appears.
MS-25789 wins, and not just for being newer: auto-un-archiving on open makes the archived filter self-defeating, since merely looking at an archived conversation drags it back into the default list. You could never browse your archive without destroying it. The
IsArchivedremark is corrected here, recording what it used to say and why, so nobody reintroduces it.Decisions
Verified in a browser — the whole journey
That last row is the one that matters: it proves the store changed, not just the component.
5 bUnit tests, red-checked by stubbing out the
UnarchiveAsynccall. 473 tests pass; Release build clean.Not in scope
The import/export controls MS-25789 also describes depend on MS-25790 (the JSON format).
🤖 Generated with Claude Code