Skip to content

Broadcast Input ship list #15812

Closed
Closed

Description

From the 1.19.2201 Bug Bash.
x-ref:

### Tasks
- [x] `toggleBroadcastInput` isn't in the default settings
- [x] The cursors forget to keep blinking if you focus each pane and then unfocus them
- [x] They don't stop blinking when you unbroadcast
- [x] Broadcast border doesn't appear when you make new panes, but they ARE broadcasted-to!
- [ ] Broadcast doesn't work if you use context menu paste
- [ ] https://github.com/microsoft/terminal/issues/16287

dev/migrie/b/15812-broadcast-nits

Activity

  1. added
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    Needs-Tag-FixDoesn't match tag requirements
    on Aug 9, 2023
  2. added
    Issue-BugIt either shouldn't be doing this or needs an investigation.
    Area-UserInterfaceIssues pertaining to the user interface of the Console or Terminal
    and removed
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Aug 9, 2023
  3. zadjii-msft commented on Sep 5, 2023

    @zadjii-msft
    Author
  4. zadjii-msft commented on Sep 18, 2023

    @zadjii-msft
    MemberAuthor
    • TermControl::_PasteCommandHandler is called for the context menu. (The same path is followed for the normal r-click paste)
      • ControlInteractivity::RequestPasteTextFromClipboard raises a PasteFromClipboard event
        • handled in TerminalPage::_PasteFromClipboardHandler
          • Calls the event's HandleClipboardData() property
            • calls to ControlInteractivity::_sendPastedTextToConnection
              • calls ControlCore::PasteText

    BUT

    TermControl::_pasteTextWithBroadcast is only on TermControl (while the rest of that madness occurs in TerminalPage and ControlInteractivity). GAH.


    When we do a paste action (TerminalPage::_PasteText), we just have every control in the tab do a TermControl::PasteTextFromClipboard, which does a _interactivity.RequestPasteTextFromClipboard. The app is orchestrating them all asking for the clipboard contents.

  5. zadjii-msft commented on Sep 18, 2023

    @zadjii-msft
    MemberAuthor

    a dumb solution:

    • don't have the app orchestrate telling all the broadcasted-to panes ask for a paste on paste.
    • INSTEAD on ControlInteractivity::_sendPastedTextToConnection, raise a StringSent to TermControl.
      • TermControl can then check if it's got _StringSentHandlers and re-raise if needed

    I feel like that's how it was originally done in an earlier form of #14393...

  6. DHowett commented on Sep 18, 2023

    @DHowett
    Member

    I remember we were talking about adding an API to TermControl along the lines of WriteString(Source, String), where Source would control whether it was (1) bracketed (2) stripped of control sequences (3) etc. Like, "Pasted" strings got the configured treatment, Raw or Input or whatever strings get no treatment at all.

    That would afford us the ability to add Source::Broadcast (as a flag(!)), funnel almost all inputs through WriteString, and not accidentally rebroadcast broadcast strings.

  7. zadjii-msft commented on Sep 18, 2023

    @zadjii-msft
    MemberAuthor

    okay something else I tried: 35aba0c

    even simpler than before. The way this is layered:

    • TerminalPage will only be asked to look up the clipboard once
    • It will apply the paste warnings as needed. One time.
    • Then, it'll write it to the control that asked for the paste's callback.
    • The control itself will then StringSent that text to the other controls.
      • The sending control does get to do the bracketed paste thing
      • The others however just get the RawWriteString. That ends up in a non-bracketed paste
        • uhg okay, so I would need to send the source with the StringSentEventArgs. That'll pollute the tree a bit...
  8. zadjii-msft commented on Sep 4, 2024

    @zadjii-msft
    MemberAuthor

    Closing since there's only one thing left in here (and we've shipped a couple times with that one thing)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-UserInterfaceIssues pertaining to the user interface of the Console or TerminalIssue-BugIt either shouldn't be doing this or needs an investigation.Needs-Tag-FixDoesn't match tag requirementsProduct-TerminalThe new Windows Terminal.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions