Skip to content

feat: Implement stack-based multiple dialogs management in TUI#355

Merged
rumpl merged 1 commit intodocker:mainfrom
rumpl:feature/multiple-dialogs-management
Oct 1, 2025
Merged

feat: Implement stack-based multiple dialogs management in TUI#355
rumpl merged 1 commit intodocker:mainfrom
rumpl:feature/multiple-dialogs-management

Conversation

@rumpl
Copy link
Copy Markdown
Member

@rumpl rumpl commented Sep 29, 2025

This PR implements a stack-based dialog management system that supports multiple overlapping dialogs in the TUI.

@rumpl rumpl force-pushed the feature/multiple-dialogs-management branch 5 times, most recently from efa5dfe to 3e49ada Compare October 1, 2025 07:36
- Replace single dialog with LIFO stack for managing multiple overlapping dialogs
- Add GetLayers() method to return all dialog layers for proper rendering
- Add DialogCount() method to query number of active dialogs
- Implement CloseAllDialogsMsg for clearing entire dialog stack
- Update message routing: only topmost dialog receives input events
- Propagate window resize events to all dialogs in stack
- Add comprehensive test suite with 5 test cases covering all operations
- Maintain full backward compatibility with existing dialog usage

This enables nested dialogs and multi-step workflows in the TUI, with proper
modal behavior and automatic resource management.

Co-authored-by: cagent <cagent@docker.com>
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
@rumpl rumpl force-pushed the feature/multiple-dialogs-management branch from 3e49ada to 8ac3132 Compare October 1, 2025 07:37
@rumpl rumpl marked this pull request as ready for review October 1, 2025 08:16
@rumpl rumpl requested a review from a team as a code owner October 1, 2025 08:16
Copy link
Copy Markdown
Contributor

@krissetto krissetto left a comment

Choose a reason for hiding this comment

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

Noice. The tests mentioned in the pr description aren't there though, is that intentional?

@rumpl
Copy link
Copy Markdown
Member Author

rumpl commented Oct 1, 2025

Noice. The tests mentioned in the pr description aren't there though, is that intentional?

Fixed

@rumpl rumpl merged commit 179b092 into docker:main Oct 1, 2025
5 checks passed
@rumpl rumpl deleted the feature/multiple-dialogs-management branch November 4, 2025 13:02
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