Notes - joeyhub/superputty GitHub Wiki
#Potential issues
Parsing OpenWith options might crash for an initial install for empty text. Needs to be tested.Fixed X2.
#Missing
Configuration checkbox for prefix tabs.Now a tab title behaviour.Configuration GUI for open with.It is simple but works.- C# doc for methods and classes. Last step.
#Ideal
- Some despaghettification of the class structure.
- Comments for private items.
#Objective
To improve performance or to make it easier to improve performance.
To modify the core data model for sessions to allow multiple sources in the tree that can be updated in real time or manually by right clicking and reloading. Specifically, a network service which sends updates in real time and that is built specifically to match the requirements of the new internal data format that will be implemented.
These changes will allow an extensible tree structure. A user will be able to right click and create a new source folder which will include sources from another
I have taken a more fundamental and integrated approach to this rather than relying on importers that overlay the existing system. This approach does not prohibit the simpler approach and allows more flexibility.
To have a sufficiently flexible system that other features can be added so that it will be possible to merge into upstream master to receive continued updates and avoid a fork.
#Status
This branch is buildable and relatively stable but should not be used other than for testing purposes. The file formats are subject to change without warning and without backwards compatibility.
An XML File source has been implemented experimentally as a prototype to help determine requirements for class structure, GUI and user interaction.
I have experimented with integrating network sources to give a picture of future requirements and have subsequently removed those prototypes.
Upstream master is continually integrated into this branch.
Next:
- Switching back to unique names.
- Using very simple backwards compatible schema for full ids.
- Session folders and connections will have properties defining certain UI options.
- Sources to be singleton by various parameters (type, source, guid).
- The root folder fill be the only folder to load sources.
- Experiment with simple automatic type converters on drop/drag.
#Problematic issues
Confirming .NET compatibility/version.
Need to double check that all the new libraries used are within a certain .NET version.
Applying updates to sessions to linked resources (layouts, etc).
Moving or deleting a session should trigger an update in layouts.
However this appears to be deeply embedded in a third party library. To open all layout files and update each time is excessive.
Each session could use a globally unique id rather than an id space per node. This is easy to implement and falls in line with future changes. It is less flexible for highly dynamic trees with mixed origins. It is also slower as it requires a full tree search to locate a node. Right now it works similarly to MIB and SNMP.
It is possible to iterate all layouts, load into a scope instance, modify the persist string accordingly and to put the layout back.
I think that this problem has always existed with remove and rename. I can't see any provisions for this in the original version so I do not think it should be fixed now.
There is a slight behaviour change. A rename should not invalidate and item in layouts. On the other hand restoring an item by name will cause it to reactivate in the original but not in the new.
Paths, unique identities and names
I implemented an id system that avoids problems with duplicate names which were harder to manage with the original system. However I think that I should go back to a system of unique names now that it might be easier to handle. The only major drawback of this is that some instances would need a delimiter and I don't want this because from multiple sources it is not clear what the delimiter will be. This would need something special for paths or a lot of thinking about the best delimiter with the lowest chance of colliding with something else. It could be possible to encode or escape identifiers but I need to choose an encoding that humans can deal with. It might be enough to have the delimited escaped with backslash. The idea of varying delimiters is also worth some consideration which would mean that the head of the string would have to be taken by each node processing it (this is still an imperfect approach however in some edge cases). This is something I must strongly consider before submitting the data format as a final one. Id strings could also use JSON although it is a bit verbose and doesn't port to command line well. CSV style parsing is more minimal. That is useful because it allows reusing a serializer with common library support.
CSV means a path will appear as: folderA,folderB,folderC,SessionA
In some cases a user might need to put something like:
- folderA,folderB,folderC,"SessionA, Something else"
- folderA,folderB,folderC,"SessionA, ""Something else"""
CSV libraries often support a choice of delimiter so it might be possible to return to / as a delimiter and use CSV just to add new escaping when needed which is minimal and compatible. Using , as a delimiter might mean slightly less programming for anyone that wants to send a path as well as more likely library compatibility but my gut feeling is that the number of relevant libraries that don't allow a choice of delimiter might be too small to be a concern.
Users of superputty should be at least somewhat technical so should be able to manage this if it is documented. Currently use cases for user handling of id strings appear to be very low.
By name effects:
Move folder. Create folder. Copy Folder. Move Session. Create Session. Edit Session. Copy Session.
Many of those can use a check and in some cases auto rename.
Import - this can create a new folder that can be auto renamed. It introduces a question of merging. If it overlays the base tree it will need to merge with existing sessions in some places. This will need an underwrite, overwrite or skip consideration. Multiselect and bulk move down the line could accomplish the same. I think it might be best to stick to importing into a unique folder and for improved UI features in the session tree to manage merging later.
###Nesting and Circular references
Sources and circular references needs some decisions to be made.
- Multiple session panels, for each source is a possible simplification or a root node for each. I like my one giant outrageously flexible tree to rule them all though but this approach deserves strong consideration. A root node per source is the easiest to implement at this stage.
- I've used a Guid in one case. A constraint on type and source string can also work for the most part. There is no guaranteed way to always eliminate circular references.
- Circular references are less problematic without automatic loading or with control over automatic loading but this can get fairly complex. If everything except the root is manually loaded the user can load sources in a circular fashion until their hearts content. This makes some weird problems though with modifying one loaded instance with the others representing the old state.
- Have various rules about what sources can be loaded within other sources. This can also be tricky.
I went for the nested approach because it allows organisation within folders. It was generally more flexible and in ways easier to implement. Something like this could be overlayed (given a path to appear in that must be in the standard root tree) but it isn't pretty and could cause other problems similar to the layout problems. Perhaps given the pains of implementation and weird possibilities it brings about keeping other sources in the top level would not be such a deficit to the user. I can't see it being problematic unless the user has an awful lot of remote sources they might want to sort/categorise somehow.
On the other hand, if the quest for perfection is dropped we could leave it in the hand of users/developers of plugins to be responsible for those strange cases where circular references might happen. Enhancing the Guid system by using a string/source on top to try to predetect issues then where possible using a guid, etc could be enough. It is more of a fringe issue.
#Recommendation
- Propose future plan for a 2.* or 3.* release which removes any legacy elements (backwards compatibility, etc) at best providing importers.
#Features I will add once stable
- A network folder that is has a read only property for the treeview and a remote unique id property. This takes data from a streaming TCP service. This will be my own personal thing but will also to test the feasibility and help provide an initial pattern.
#Other bugs that I know about and may or may not fix
- Hotkeys not registering when the putty window is focused. This is problematic for quick switching.
In some situations the putty window steals focus when it shouldn't.Quick fix. Several issues with focusing remain.- The full path text doesn't fit into the open sessions dialog and it is not resizable.
- DataView for open session crashes with a large number of sessions due to stack overflow. To reproduce you have to go to the bottom of the list and choose an item.
- Sometimes the puttypanel still have the border. This suddenly started happening a lot so I might have damaged it.
- In at least one instance panels started opening outside of the dock pane. Seemed to fix its self after I closed some and changed tab a few times.
#Other bugs I will likely leave for others to fix/investigate (can be registered as issues):
- Drop down menu for open tabs gets too big.
- Putty can be expensive for the CPU/GUI when it has a lot of activity (could test with playing a libcaca movie). It should be confirmed whether or not putty can reduce load when out of view (open separately, play libcaca until slow then minimise and see if there is a difference) and if so if it does this with superputty with tests (same but instead of minimise make not shown in tab). However I think the GUI performance problems are largely solved now.
#Other possible future features:
Included with my thoughts (+ means I think it should be done, - means I think it should not be done or not done until later, ~ means its 50/50).
- Connect N times. + Should be easy.
- Ability to export config files for other apps, perhaps on a per folder basis. ~ Might be better as a personal plugin.
- Encrypted config with single password. + Should be easy and other users want it.
- Manage pageant/etc. - A bat script can manage.
- Replace pageant with single password solution. ~ Depends how easy the pageant protocol is to copy.
- Allow the sessions list to be shown (cloned) as many times as the user likes so that different filters can be used. ~ It is not essential but could be easy.
- More advanced send commands filters using switch session like filter. ~ Also not essential. This kind of thing should be scripted.
- WPF? - Wont improve much.
- Tab groups? - A lot of work, small improvement. Would be better to think about when the software is more stable.
- Application panel groups? - Same as tab groups.
- Live sessions in tree, etc? - Same as tab groups (potential scope creep at this stage).
- In built SSH capability. - A lot of work, small improvement, also replacing scripts.
- Add copy host/port/both to keyboard. + Easy to do. Helps fill the gap.
- Multi select in treesession. - Feature creep at this stage.
- Ability to dock preferences window. ~ Depends if it is easy.
- Openwith to be able to dock. + If time permits.
- Option to create dock grids. ~ If time is available. How to implement can vary. Might be a layouts related issue.
- Evil: Allow any window/application to be dragged into a dock. - Changes the scope of the application into a window manager.