Resize notifications must integrate with fiber concurrency without OS-thread callbacks.
Design model
Platform spec article
Design model
Spec standingStandard
-
Cross-fiber resize uses Channel; same-fiber uses OnResize hub.
Context
Decision
Rule Detail Cross-fiber PollResize→Channel<ConsoleMessage>Same-fiber OnResizeevent hubConsequences
No separate OS-thread callback API in v1.
Verification anchors
ConsoleMessageChannelTests.bd. -
Env size parsing is best-effort discrete table in v1.
Context
Not all hosts expose Winsize ioctl; env vars are a portable fallback.
Decision
Rule Detail Order Winsize ioctl then COLUMNS/LINESParse Discrete table, not full integer grammar in v1 Consequences
Odd env values may clamp or ignore per contracts article.
Verification anchors
Platform/Terminal.bdtests. -
Failed resize Channel Send is silent in v1 poll loops.
Context
UI loops should not crash when consumers drop resize messages.
Decision
Rule Detail EVT-002 Failed Sendon resize is silent in v1Future May gain diagnostics in a later ADR Consequences
Poll loops continue after dropped resize notifications.
Verification anchors
ConsoleMessageChannelTests.bd; EVT-002 traceability.
- Contracts and edge cases Resize polling and delivery requirements.
- Design model ConsoleMessage variants and resize notification surfaces.
- Examples Subscribing to resize via channel or event hub.
- Flow and algorithm PollResize and RunTick integration.
- Verification and traceability Resize channel tests and platform extern anchors.
0 revisions (git unavailable at build; counts may be empty)
No commits recorded for this path.
| Section id | Required | Found |
|---|---|---|
what-this-feature-specifies | yes | yes |
implementation-anchors | yes | yes |
Full tree: run pnpm verify:platform-spec-layout (writes src/generated/platform-spec-layout-report.json).
Purpose
Section titled “Purpose”Document design model for the Console Terminal Events feature: role-specific normative detail beyond the feature hub.
Canonical references
Section titled “Canonical references”- Feature hub: Console Terminal Events
- Sibling articles in this bundle (design model, contracts, flow, examples, verification)
Detailed behavior
Section titled “Detailed behavior”ConsoleMessage
Section titled “ConsoleMessage”| Variant | Payload | Use |
|---|---|---|
Resize(ConsoleSize) | columns/rows | Terminal geometry changed |
| (tick-related) | — | Integrated with Console.RunTick polling |
Messages flow on an unbounded Channel<ConsoleMessage> created by Console.MessagesChannel() unless callers supply their own channel.
OnResize hub
Section titled “OnResize hub”Same-fiber event OnResize(ConsoleSize) with cached lastSize. Distinct from Concurrency.Hub (channel multiplexing). Use when resize handlers must run on the UI fiber without cross-fiber Send.
Size probing stack
Section titled “Size probing stack”flowchart TD winsize[Platform Winsize ioctl] env[COLUMNS / LINES env] query[Terminal.QuerySize] winsize --> query env --> query
ANSI screen modes are unrelated to size events; see ANSI escape model.
Verification
Section titled “Verification”See the verification and traceability article in this bundle and compiler/corelib/beskid_corelib/tests/corelib_tests/src/console/.
Related topics
Section titled “Related topics”- Parent feature hub and Terminal and console area