Skip to content

Groundwork for Ttyper moving forward#175

Open
philocalyst wants to merge 30 commits intomainfrom
ttyperv1.5
Open

Groundwork for Ttyper moving forward#175
philocalyst wants to merge 30 commits intomainfrom
ttyperv1.5

Conversation

@philocalyst
Copy link
Copy Markdown
Collaborator

  • Building off of Tui-Realm
    • This gives us the interface needed to begin building out integration tests, as it abstracts the actual key-handling logic between message passing
    • Gives a much more structured interface for creating future screens, typing indicators, general UI improvements, the like
    • Allows for the possibility of greater modularity in the future.
  • Structured error handling, using Eyre and thiserror.
    • Gives all internal errors types, which should open up routes for recovery logic
    • Eyre allows us to print errors with much more... pizzaz
  • General restructuring
    • To make the crate much easier to hack on, and the path towards addition more obvious.

Copy link
Copy Markdown
Owner

@max-niederman max-niederman left a comment

Choose a reason for hiding this comment

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

I think this work is mostly good, but I strongly dislike the use of a crate::types module for all types. Almost all of the types here are really only used in one or two modules, and have a module that they're naturally scoped to. For example, Opt and Command should be scoped to main.rs, and types::test::{self, handler} should pretty clearly be a top-level test module.

Comment thread src/main.rs
Comment thread src/model.rs Outdated
Comment thread src/resources.rs Outdated
Comment thread src/types/mod.rs Outdated
@philocalyst
Copy link
Copy Markdown
Collaborator Author

philocalyst commented Mar 26, 2026

Should be good now :) @max-niederman

For default XDG conformance
Comment thread src/main.rs Outdated
Comment thread src/main.rs Outdated
@philocalyst
Copy link
Copy Markdown
Collaborator Author

philocalyst commented Mar 27, 2026 via email

@hasezoey
Copy link
Copy Markdown

hasezoey commented Mar 27, 2026

Smol-compatible

I have not seen that crate yet, without looking it up, i guess it is another async runtime.
(after looking it up, it is practically a continuation of async-std)

Well, currently tuirealm's async mode is only tokio compatible as we require a reference to the runtime handle (which currently is specific to each runtime) to spawn the tasks and use tokio's channels, because tokio is already available(turns out we dont use async channels, i forgot), and frankly tokio is the most commonly used one. (and it is the only one i am currently familiar with)
I guess if there is enough demand, we could implement something to be generic over those handles and switch the other async types.

EDIT: created a issue for it veeso/tui-realm#201

@philocalyst
Copy link
Copy Markdown
Collaborator Author

philocalyst commented Mar 27, 2026 via email

With more complexity this will EVENTUALLY make sense
@philocalyst
Copy link
Copy Markdown
Collaborator Author

Better now, @max-niederman

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants