Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web,mobile): a turn you expanded stays open when the next run starts #23608

Openjuliusmarmingewants to merge 12 commits intomain fromrefs/pull/23608/headopened View on GitHub

Showing 3 changed files with 115 additions and 5 deletions (loading 1).

x
0 of 3 viewed, 3 left
18 additions and 5 deletionsapps/mobile/src/features/threads/ThreadFeed.tsxModified
View file
@@ -2736,12 +2736,14 @@
readonly expandedWorkGroups: Record<string, boolean>;
readonly expandedWorkRows: Record<string, boolean>;
readonly expandedTurnIds: ReadonlySet<RunId>;
+ readonly interruptExpandedTurnId: RunId | null;
readonly revealedMessageId: MessageId | null;
copiedRowId: null,
expandedWorkGroups: {},
expandedWorkRows: {},
expandedTurnIds: new Set(),
+ interruptExpandedTurnId: null,
revealedMessageId: null,
const { copiedRowId, expandedWorkGroups, expandedWorkRows, expandedTurnIds, revealedMessageId } =
@@ -3400,7 +3402,8 @@
return new Set(terminalIdsByTurn.values());
})();
- // An interrupted run unfolds; a run that is no longer latest folds back.
+ // An interrupted run unfolds and folds back once it is no longer latest;
+ // a run the user opened stays open.
const [previousLatestRun, setPreviousLatestRun] = useState(props.latestRun);
if (previousLatestRun !== props.latestRun) {
setPreviousLatestRun(props.latestRun);
@@ -3408,17 +3411,22 @@
const previous = previousLatestRun;
if (latest && previous) {