Skip to content

refactor(discord_bot): conform /pm calendar view to UI standards (fixes #115) - #116

Merged
espdesign merged 2 commits into
developfrom
arch/115-calendar-view-ui-standards
Nov 6, 2026
Merged

espdesign merged 2 commits into
developfrom
arch/115-calendar-view-ui-standards

Conversation

@espdesign

Copy link
Copy Markdown
Collaborator

Summary

Resolves #115.

Conforms the /pm calendar ephemeral view (CalendarFeedView) to project UI/UX standards, timeout lifecycle, and session management contracts.

Changes

  • Close Button: Added secondary Close button (style=discord.ButtonStyle.secondary, row=0) and callback to CalendarFeedView that cleans up and unregisters from MenuSessionManager.
  • Session Management: Registered ephemeral interaction in MenuSessionManager.register_menu(interaction) during /pm calendar. Added MenuSessionManager.update_interaction(...) to maintain active session state across message edits.
  • Timeout Token Freshness: Updated CalendarFeedView._on_regenerate_clicked to update self._initial_interaction and synchronize with MenuSessionManager so BaseView.on_timeout operates against a live interaction token rather than an expired one.
  • Router Pattern: Delegated view and embed construction in PmCog.calendar to DiscordViewRouter.build_calendar_feed_view(...).
  • Specs & Tests: Added unit tests in test_calendar_feed.py, test_hub_menu_dismissal.py, and test_menu_manager.py. Synced requirement changes to openspec/specs/hub-menu-dismissal/spec.md.

Acceptance Criteria

  • CalendarFeedView includes a secondary Close button in row 0.
  • Clicking Close deletes the ephemeral message and stops the view.
  • Ephemeral interaction is registered in MenuSessionManager.register_menu().
  • on_timeout() dismisses the message and unregisters the session.
  • Unit tests added verifying button layout, close callback, and timeout dismissal.

@espdesign
espdesign merged commit 32668c3 into develop Nov 6, 2026
8 checks passed
@espdesign
espdesign deleted the arch/115-calendar-view-ui-standards branch November 6, 2026 00:29
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.

[UI/UX]: Conform /pm calendar view to UI standards (Close button, timeout lifecycle, and MenuSessionManager)

1 participant