Skip to content

feat: route editor notifications to command line with recent message preview#225

Merged
mlightcad merged 1 commit intomainfrom
feat/message
Apr 20, 2026
Merged

feat: route editor notifications to command line with recent message preview#225
mlightcad merged 1 commit intomainfrom
feat/message

Conversation

@mlightcad
Copy link
Copy Markdown
Owner

PR Title

Route editor notifications to command line with recent message preview

PR Description

Summary

  • Centralized editor notification output through command-line APIs instead of directly emitting layer command messages on the global event bus.
  • Added typed message plumbing (AcEdMessageType) across AcEditor, AcEdInputManager, and AcEdCommandLine.
  • Introduced a recent-message preview area above the command line that keeps the latest two messages visible and auto-hides after command completion.

Why

  • Layer and input workflows needed a consistent, UI-owned path for user-facing feedback.
  • Typed message severity handling (especially warnings) improves clarity for invalid inputs and command feedback.
  • Recent-message preview improves visibility of prompt/status text without forcing the full history panel to stay open.

What Changed

  • Replaced layer command notify() implementations to call AcApDocManager.instance.editor.showMessage(...) with AcEdMessageType.
  • Moved AcEdMessageType into editor/input/ui/AcEdMessageType.ts, updated imports/exports, and reused it in eventBus typing.
  • Added showMessage(...) forwarding methods in AcEditor and AcEdInputManager.
  • Refactored command-line message rendering:
  • Unified showMessage/error paths into typed appendMessage.
  • Mapped warning messages to error-style line rendering for visibility.
  • Recorded prompt/message text into a two-line recent panel.
  • Added command lifecycle hooks to keep recent messages visible during commands and hide them 2s after command end.
  • Updated keyword/entity rejection flows to emit warning messages via the new typed API.

Risks / Notes

  • The new command lifecycle binding in AcEdCommandLine depends on AcApDocManager.instance.editor.events availability and uses deferred retry; startup timing should be verified in integration.
  • Warning and error message types currently share the same history-line visual style; confirm this is intended UX.
  • Recent-message panel visibility overlaps with existing popup layering; behavior in edge layouts/resizes should be validated manually.

@mlightcad mlightcad self-assigned this Apr 20, 2026
@mlightcad mlightcad added the enhancement New feature or request label Apr 20, 2026
@mlightcad mlightcad merged commit 2a15168 into main Apr 20, 2026
2 checks passed
@mlightcad mlightcad deleted the feat/message branch April 20, 2026 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant