xibbon / LaTerminal

50 stars 2 forks source link

The Terminals count does not update immediately after closing via the exit command and losing the connection.... #25

Closed instabug[bot] closed 1 year ago

instabug[bot] commented 1 year ago

:clipboard: Bug Details

The "Terminals" count does not update immediately after closing via the "exit command" and losing the connection. Not a problem, really, but it would be nice if this were updated when going back to the main view.

key value
Reported At 2022-09-27 11:03:16 UTC
Categories Suggest an improvement
App Version 1.0.4 (263)
Session Duration 553
Device iPhone 13 Pro Max, iOS 16.0
Display 428x926 (@3x)

:point_right: View Full Bug Report on Instabug :point_left:


:iphone: View Hierarchy

This bug was reported from _TtGC7SwiftUI19UIHostingControllerVVSP10$197bc903821BridgedNavigationView8RootView Find its interactive view hierarchy with all its subviews here: :point_right: Check View Hierarchy :point_left:


:chart_with_downwards_trend: Session Profiler

Here is what the app was doing right before the bug was reported:

Key Value
CPU Load 0.4%
Used Memory 3.4% - 0.1/3.0 GB
Used Storage 40.3% - 96.08/238.3 GB
Connectivity WiFi - Unknown
Battery 71% - unplugged
Orientation portrait

Find all the changes that happened in the parameters mentioned above during the last 60 seconds before the bug was reported here: :point_right: View Full Session Profiler :point_left:


:mag_right: Logs

User Steps

Here are the last 10 steps done by the user right before the bug was reported:

10:50:09 Swipe in LaTerminal.SshTerminalView in LaTerminal.TerminalViewController
10:49:53 Top View: LaTerminal.TerminalViewController
10:49:52 Top View: ConfigurableUITerminal
10:49:52 Tap in _TtGC7SwiftUI15CellHostingViewGVS_15ModifiedContentVS_14_ViewList_ViewVS_26CollectionViewCellModifier__ in _TtGC7SwiftUI19UIHostingControllerVVS_P10$197bc903821BridgedNavigationView8RootView_
10:49:50 Application: DidBecomeActive
10:49:50 Application: SceneDidActivate
10:49:50 Top View: _TtGC7SwiftUI19UIHostingControllerVVS_P10$197bc903821BridgedNavigationView8RootView_
10:49:50 Top View: RecentHostsView
10:49:50 Top View: HostSummaryView
10:49:50 Top View: HomeView

Find all the user steps done by the user throughout the session here: :point_right: View All User Steps :point_left:


:warning: Looking for More Details?

  1. Network Log: we are unable to capture your network requests automatically. If you are using AFNetworking or Alamofire, check the details mentioned here.
  2. User Events: start capturing custom User Events to send them along with each report. Find all the details in the docs.
  3. Instabug Log: start adding Instabug logs to see them right inside each report you receive. Find all the details in the docs.
  4. Console Log: when enabled you will see them right inside each report you receive. Find all the details in the docs.
migueldeicaza commented 1 year ago

The challenge is that currently any changes to the top-level view re-render everything, and on the iPad if you have the "Terminals" window open, this means that it automatically "pops-out" just after you open a terminal.

I am hoping that iOS 16 will let me fix this properly, a patch to have the connection reflect this, which I can not currently use is here:

https://gist.github.com/f1eaa27b166f5d7ba8cb28f7c020b15f

Maybe switching to the iOS 16 only API fixes this:

https://stackoverflow.com/questions/69143014/swiftui-navigation-popping-back-when-modifying-list-binding-property-in-a-pushed

Also, I have a self-replicating example of the pattern problem:

https://tirania.org/tmp/swiftui-bug-navigation.tar.gz

migueldeicaza commented 1 year ago

Dropped the feature for now, as it generally causes a lot of trouble for SwiftUI (the constant pop out problems on iPad is rooted on updating values that are monitored by the top-level view)