Repository navigation
FIX: keep user-authored working text across runtime generation changes - #2873
Conversation
…ion changes the generation-change branch in useChatConverters wiped workingInputs, discarding manually edited working-copy text along with the (correctly invalidated) generated stage results. user text now survives the swap; generated results still clear. regression tests fail on main (microsoft#2867). Signed-off-by: Manohar Paturi <186662190+ManoharPaturi@users.noreply.github.com>
|
Roman Lutz (@romanlutz) both points addressed:
all three green locally, tsc clean. |
…s with the generation romanlutz's review caught that preserving workingInputs wholesale across a generation change keeps an edit made against an older draft: the piece id is reused, so the stale edit displays against (and can be applied to) new text. the generation branch now runs the same piece reconciliation reconcileInputs applies — edits survive only when their underlying value is unchanged. also upgrades the tests per review: generation resets per test, a real generated stage result (mocked previewConversion) is created before the swap and asserted cleared, and a new test pins the stale-edit drop. Signed-off-by: Manohar Paturi <186662190+ManoharPaturi@users.noreply.github.com>
|
Roman Lutz (@romanlutz) both added:
4/4 green. |
7ad4a0c to
2d1f889
Compare
|
Roman Lutz (@romanlutz) good catch again — the old version asserted a result that never existed. the configured-pipeline test now runs convert() after the hand edit, asserts stageResults['text'] has the real generated stage, then advances the generation and checks both halves: the working edit survives AND the generated result clears. 4/4 green. |
Roman Lutz (romanlutz)
left a comment
There was a problem hiding this comment.
I also left one comment thread open. Please take a look at that one.
Signed-off-by: Manohar Paturi <186662190+ManoharPaturi@users.noreply.github.com>
|
Roman Lutz (@romanlutz) done — the configured-pipeline test now runs convert() after the hand edit (asserting a real stage result exists), then advances the generation and checks both halves: the hand edit survives while the generated result clears. pushed in 714f455, 4/4 green. |
Refs #2867
what happens
useChatConvertersclearedworkingInputswhen the runtime generation changed, so a successful live reinitialization replaced manually edited working-copy text with the original composer text. An administrator applying config in another tab could discard another user's unsent work (P1, per issue).fix
the generation-change branch keeps
workingInputsand only invalidates the generated results (stageResults,errors,applied). working entries for pieces that no longer exist are inert since lookups are by current input id.tests
two regression tests in a new hook test file: working text survives a generation swap, and generated stage results still clear. both fail on main (the first asserts the surviving edit; on main it comes back undefined), pass here.
env: main
c32546a