# fix\(server\): sync pull request draft status changes · PR \#22832 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/pull/22832)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

State: merged

Source repository: pingdotgg/t3code

Source branch: t3/sync-pr-draft-sidebar-status

Target branch: main

Head commit: b6f33dc7d0cad8ba8cf7492819f2be5940dfa12b

[Discussion and reviews](https://git.cafe/pingdotgg/t3code/pull/22832)

[Commits](https://git.cafe/pingdotgg/t3code/pull/22832/commits?format=markdown)

[Files changed](https://git.cafe/pingdotgg/t3code/pull/22832/diffs?format=markdown)

## Description

---

## Problem

The sidebar can keep showing a pull request as a draft after it becomes ready. Its saved status only refreshed when the PR changed between open, closed, or merged, so changes to `isDraft` were missed.

## Change

Track draft status alongside the PR state when detecting changes. Refresh linked thread snapshots when draft status changes, and include draft status in reports from connected environments.

## Scope and approval

This is a focused fix for an obvious stale sidebar status. The thread details menu already reads the current draft status, but the sidebar's saved snapshot did not update when only that status changed.

## Verification

Ran 162 focused tests, package typechecks for the server, client runtime, and contracts, and lint on the changed files. Lint reported existing warnings. Browser verification was not run.
