Skip to content

PDChat: let a conversation be un-archived (fixes #121) - #122

Merged
davidnmbond merged 1 commit into
mainfrom
feat/issue-121-unarchive-conversation
Aug 29, 2026
Merged

PDChat: let a conversation be un-archived (fixes #121)#122
davidnmbond merged 1 commit into
mainfrom
feat/issue-121-unarchive-conversation

Conversation

@davidnmbond

Copy link
Copy Markdown
Contributor

Closes #121. Jira: MS-25789 (un-archive slice).

UnarchiveAsync has 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

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 IsArchived remark is corrected here, recording what it used to say and why, so nobody reintroduces it.

Decisions

  • Hidden, not disabled, when not archived — MS-25789's own stated exception to its "disable with a reason" rule.
  • Archiving closes the tab; un-archiving does not. The user has just said they want the conversation back; removing it from their screen would be perverse.

Verified in a browser — the whole journey

Step Result
Default list (archived hidden) 3 conversations
Un-archive control shown initially no
Tick Include archived 4 conversations
Open the archived one opens as its own tab
Still archived after opening yes
Un-archive control now shown yes
Use it → control disappears yes
Tab stays open yes
Untick Include archived → conversation in the DEFAULT list yes
Console errors none

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 UnarchiveAsync call. 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

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>
@davidnmbond
davidnmbond merged commit 0e7c802 into main Aug 29, 2026
1 of 3 checks passed
@davidnmbond
davidnmbond deleted the feat/issue-121-unarchive-conversation branch August 29, 2026 23:50
@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 6 medium

Alerts:
⚠ 6 issues (≤ 0 issues of at least minor severity)

Results:
6 new issues

Category Results
BestPractice 6 medium

View in Codacy

🟢 Metrics 1 duplication

Metric Results
Duplication 1

View in Codacy

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.

Run reviewer

TIP This summary will be updated as you push new changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PDChat: no way to un-archive a conversation - UnarchiveAsync exists and nothing calls it

1 participant