Skip to content

Fix AppendCommandLine missing from NewTerminalArgs serialization#19917

Closed
TheJesper wants to merge 1 commit intomicrosoft:mainfrom
TheJesper:fix/append-commandline-serialization
Closed

Fix AppendCommandLine missing from NewTerminalArgs serialization#19917
TheJesper wants to merge 1 commit intomicrosoft:mainfrom
TheJesper:fix/append-commandline-serialization

Conversation

@TheJesper
Copy link
Copy Markdown

@TheJesper TheJesper commented Feb 28, 2026

Summary

  • AppendCommandLine was defined as a property on NewTerminalArgs but omitted from FromJson, ToJson, Copy, and Hash
  • This caused the property to be silently dropped during serialization round-trips (tab duplication, window restore, settings persistence)
  • Adds AppendCommandLine to all four methods, consistent with every other property on NewTerminalArgs

Details

Every other property on NewTerminalArgs (Commandline, StartingDirectory, TabTitle, ProfileIndex, Profile, SessionId, TabColor, SuppressApplicationTitle, ColorScheme, Elevate, ReloadEnvironmentVariables, ContentId) is present in all four serialization methods. AppendCommandLine was the only one missing.

Validation

  • Built and ran SettingsModel.Unit.Tests.dll — all tests pass
  • Full solution build succeeds
  • Manual test: tab duplication now correctly preserves all NewTerminalArgs properties

Fixes #14270

@microsoft-github-policy-service microsoft-github-policy-service Bot added the Issue-Question For questions or discussion label Feb 28, 2026
AppendCommandLine was defined as a property on NewTerminalArgs but was
not included in FromJson, ToJson, Copy, or Hash. This meant the property
was silently dropped during any serialization round-trip (e.g. tab
duplication, window restore, settings persistence).

Adds AppendCommandLine to all four methods, consistent with every other
property on NewTerminalArgs.

Fixes microsoft#14270
@TheJesper TheJesper force-pushed the fix/append-commandline-serialization branch from 57b2736 to 635c5ed Compare February 28, 2026 01:17
Copy link
Copy Markdown
Member

@carlos-zamora carlos-zamora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few notes:

  1. The PR says it fixes #14270. However, that issue is already closed. It seems like the fix there was to configure shell integration (see this comment). In fact, that issue has been closed since 2022.
  2. AppendCommandline is used by the --appendCommandline CLI flag added in #15822. Looks like it was specifically designed for wt.exe, so I'm not sure if there's really any value to expose it beyond that.

With all that said, I'm requesting changes and closing this PR. Let me know if you disagree and we can move forward from there.

@microsoft-github-policy-service microsoft-github-policy-service Bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Issue-Question For questions or discussion Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Open windows from a previous session does not restore the working directories of any tab

2 participants