renew: stage 1 #25

Closed
opened 2026-04-30 00:02:24 +02:00 by kir68k · 2 comments
Owner

Focus: Finishing the login flow

Notes

I'll want to write documentation later for how the program works since it's partly a learning exercise so far, however,
I can already lay out some stuff.

Messages

Messages are split between two categories, based on whether they influence the TUI actor; every possible message incoming to Lattice lives at app::message, while any other kind of message lives in their respective actor module. (it's pretty much the same but currently app is its own folder/mod, whereas the "feature" actors are not, and all live as single files under src/actor xd)

For example, with the login flow, it should go kinda like this:

  1. LoginRequested (in app::message) -> Lattice receives this from UI (ui events as messages explained in later stage)
  2. Login (in session.rs) -> SessionActor receives this from Lattice, like a forwarder.
  3. LoginOk/LoginFailed (in app::message) -> Lattice receives from SessionActor.

Or, more visually:

sequenceDiagram
    UI-->>+Lattice: LoginRequested(uid, pw)
    Lattice-->>+SessionActor: Login
    SessionActor-->>+Lattice: LoginOk(client, name)
    Lattice-->>+UI: Display username
Note: I'm making these issues as to keep track with stuff, since this migration is kinda big and i forget details quickly.

I also slept 4 hours today and know ill forget everything if i dont save it somewhere. I like the issue format for this purpose.

I wanna write more of them, helps split up the whole migration. The format should be like this one, with a "focus" describing in 1 line what is being done in the stage, and a summary + list if i already know changes (can be more than that, but i liek summaries and bullets!!).

**Focus**: Finishing the login flow ## Notes I'll want to write documentation later for how the program works since it's partly a learning exercise so far, however, I can already lay out some stuff. ### Messages Messages are split between two categories, based on whether they influence the TUI actor; every possible message incoming to `Lattice` lives at `app::message`, while any other kind of message lives in their respective actor module. (it's pretty much the same but currently `app` is its own folder/mod, whereas the "feature" actors are not, and all live as single files under `src/actor` xd) For example, with the login flow, it should go kinda like this: 1. `LoginRequested` (in `app::message`) -> Lattice receives this from UI (ui events as messages explained in later stage) 2. `Login` (in `session.rs`) -> SessionActor receives this from Lattice, like a forwarder. 3. `LoginOk`/`LoginFailed` (in `app::message`) -> Lattice receives from SessionActor. Or, more visually: ```mermaid sequenceDiagram UI-->>+Lattice: LoginRequested(uid, pw) Lattice-->>+SessionActor: Login SessionActor-->>+Lattice: LoginOk(client, name) Lattice-->>+UI: Display username ``` <sub> Note: I'm making these issues as to keep track with stuff, since this migration is kinda big and i forget details quickly. I also slept 4 hours today and know ill forget everything if i dont save it somewhere. I like the issue format for this purpose. I wanna write more of them, helps split up the whole migration. The format should be like this one, with a "focus" describing in 1 line what is being done in the stage, and a summary + list if i already know changes (can be more than that, but i liek summaries and bullets!!). </sub>
kir68k added this to the a new start project 2026-04-30 00:02:24 +02:00
Author
Owner

oh also i will want SSO login support, i wanted that since day 1 even if i didn't use it back then. last week i was doing oidc related stuff, so i understand that a bit more too.

commenting now but will be its own issue or sth later

oh also i will want SSO login support, i wanted that since day 1 even if i didn't use it back then. last week i was doing oidc related stuff, so i understand that a bit more too. commenting now but will be its own issue or sth later
Author
Owner

gonna work on this in a bit

gonna work on this in a bit
kir68k stopped working 2026-04-30 23:09:08 +02:00
1 hour 26 minutes
kir68k referenced this issue from a commit 2026-05-06 15:30:05 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Total time spent: 1 hour 26 minutes
kir68k
1 hour 26 minutes
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
kir68k/lattice#25
No description provided.