Skip to content

Character Management Notes - #158

Open
frozenkro wants to merge 10 commits into
mainfrom
tui-notes
Open

Character Management Notes#158
frozenkro wants to merge 10 commits into
mainfrom
tui-notes

Conversation

@frozenkro

Copy link
Copy Markdown
Collaborator

#128

  • Reactivates notes tab
  • Introduces "active" viewport with different border. navigation done via h/left, l/right
  • Allows adding new notes + viewing existing notes + updating existing notes via the tui

@frozenkro frozenkro changed the title Notes viewport focusing Character Management Notes Mar 22, 2026
- Add ability to enqueue tea.Cmd from inside the command palette
- Use event based update pattern to account for adding, editing, and
  removing notes
Comment thread tui/manage/model.go
return innerWidth, availableHeight
}

func (m *Model) queueTeaCmd(msg any) {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I used tea.Cmd to propagate updates quite a bit in this change. The command palette / keybind pattern doesn't have a way to do this as the methods do not return tea.Cmd. This method on the model allows me to add tea.Cmd to the cmd batch at the end of the update method so subsequent updates can execute and handlers can be invoked properly.

I can probably also just drop this pattern and perform the updates directly in the user command handlers. I just found this pattern to be a bit easier to manage.

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.

2 participants