[PR #2208] [MERGED] Clean up boundary between terminal app and terminal page #24852

Open
opened 2026-01-31 09:05:45 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/2208
Author: @KaiyuWang16
Created: 8/3/2019
Status: Merged
Merged: 9/4/2019
Merged by: @KaiyuWang16

Base: masterHead: dev/kawa/1878-Clean-up-boundary-between-TerminalApp-and-TerminalPage


📝 Commits (10+)

  • 9987be8 change 1: add settings pointer and some member variables to page
  • 348d767 clean up the boundary between Page and App - First working version
  • 9387fcd First CR review change
  • f95e64d Sync and remove declaration of TraceLogger provider
  • 5e12047 Code review round 2 - apply missed new changes
  • 11258bb remove useless comment
  • 0376194 CR change round 3
  • ca1e2bb CR minor changes
  • e33d9f9 apply changes from Aug 6th to Aug 14th
  • d3aa61f Code review changes round 4

📊 Changes

9 files changed (+1531 additions, -1351 deletions)

View changed files

📝 src/cascadia/TerminalApp/App.cpp (+76 -1193)
📝 src/cascadia/TerminalApp/App.h (+17 -101)
📝 src/cascadia/TerminalApp/App.idl (+6 -7)
📝 src/cascadia/TerminalApp/AppActionHandlers.cpp (+40 -40)
📝 src/cascadia/TerminalApp/TerminalPage.cpp (+1244 -2)
📝 src/cascadia/TerminalApp/TerminalPage.h (+132 -0)
📝 src/cascadia/TerminalApp/TerminalPage.idl (+6 -0)
📝 src/cascadia/WindowsTerminal/AppHost.cpp (+7 -5)
📝 src/cascadia/WindowsTerminal/AppHost.h (+3 -3)

📄 Description

This PR is for this project: https://github.com/microsoft/terminal/issues/1878

Refere

PR Checklist

For now, the new TerminalPage class includes;

global error dialogs
ETW global registration
tab management
tab icons
clipboard management
ETW tab logging
key bindings

And App is responsible for:
settings
settings reload

One issue remaining for now is that I have not figured out how to move the four winrt event handlers in App down to Terminal. I have some work-arounds to attach AppHost methods to the event handlers, but I am still working on this.

Test: According to Griese, we do not have integration/unit tests for now. I have manually tested the app with following actions:

Open new tabs
close tabs
close the last tab
resize window
minimize/restore
ShowTitleBar, true/false
change settings: font size, background color, useAcrylic
Copy/Paste with mouse/keyboard
Tab switch/add/close/ using keys
About button
Split pane vertically and horizontally
Resize panes with keys
Move focus on different panes with keys
Change theme while the app is on.
Change cmd title while the app is on


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/2208 **Author:** [@KaiyuWang16](https://github.com/KaiyuWang16) **Created:** 8/3/2019 **Status:** ✅ Merged **Merged:** 9/4/2019 **Merged by:** [@KaiyuWang16](https://github.com/KaiyuWang16) **Base:** `master` ← **Head:** `dev/kawa/1878-Clean-up-boundary-between-TerminalApp-and-TerminalPage` --- ### 📝 Commits (10+) - [`9987be8`](https://github.com/microsoft/terminal/commit/9987be8fda5076713e98f94498660162e09dabd5) change 1: add settings pointer and some member variables to page - [`348d767`](https://github.com/microsoft/terminal/commit/348d76785bb2a29881dcd5e0bd89a169e11c1894) clean up the boundary between Page and App - First working version - [`9387fcd`](https://github.com/microsoft/terminal/commit/9387fcdb61e1e8a5a275395eed980111e5a41bdc) First CR review change - [`f95e64d`](https://github.com/microsoft/terminal/commit/f95e64d06c23697f57cbc477d06be4162216f684) Sync and remove declaration of TraceLogger provider - [`5e12047`](https://github.com/microsoft/terminal/commit/5e1204701144faaa97f068e3b113d11c5221cfb5) Code review round 2 - apply missed new changes - [`11258bb`](https://github.com/microsoft/terminal/commit/11258bb708d4d84e90bcaa36a8f200b6c9d5d8bf) remove useless comment - [`0376194`](https://github.com/microsoft/terminal/commit/03761949d4843e24d8158055be9a079e3786723a) CR change round 3 - [`ca1e2bb`](https://github.com/microsoft/terminal/commit/ca1e2bb745c20af95bf7474fbe1384b4a3be3189) CR minor changes - [`e33d9f9`](https://github.com/microsoft/terminal/commit/e33d9f961b78952e94367f1ee47ff475f9cac2d8) apply changes from Aug 6th to Aug 14th - [`d3aa61f`](https://github.com/microsoft/terminal/commit/d3aa61f964a0e39ae4d9a3b0ea1080fc22648ce8) Code review changes round 4 ### 📊 Changes **9 files changed** (+1531 additions, -1351 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/App.cpp` (+76 -1193) 📝 `src/cascadia/TerminalApp/App.h` (+17 -101) 📝 `src/cascadia/TerminalApp/App.idl` (+6 -7) 📝 `src/cascadia/TerminalApp/AppActionHandlers.cpp` (+40 -40) 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+1244 -2) 📝 `src/cascadia/TerminalApp/TerminalPage.h` (+132 -0) 📝 `src/cascadia/TerminalApp/TerminalPage.idl` (+6 -0) 📝 `src/cascadia/WindowsTerminal/AppHost.cpp` (+7 -5) 📝 `src/cascadia/WindowsTerminal/AppHost.h` (+3 -3) </details> ### 📄 Description <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> This PR is for this project: https://github.com/microsoft/terminal/issues/1878 <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## Refere <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes #1878 * [ ] Tests added/passed * [ ] ~Requires documentation to be updated~ * [x] I've discussed this with core contributors already. <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> For now, the new TerminalPage class includes; global error dialogs ETW global registration tab management tab icons clipboard management ETW tab logging key bindings And App is responsible for: settings settings reload One issue remaining for now is that I have not figured out how to move the four winrt event handlers in App down to Terminal. I have some work-arounds to attach AppHost methods to the event handlers, but I am still working on this. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> Test: According to Griese, we do not have integration/unit tests for now. I have manually tested the app with following actions: Open new tabs close tabs close the last tab resize window minimize/restore ShowTitleBar, true/false change settings: font size, background color, useAcrylic Copy/Paste with mouse/keyboard Tab switch/add/close/ using keys About button Split pane vertically and horizontally Resize panes with keys Move focus on different panes with keys Change theme while the app is on. Change cmd title while the app is on --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:05:45 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#24852