Resize notifications must integrate with fiber concurrency without OS-thread callbacks.
Flow and algorithm
Platform spec article
Flow and algorithm
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 flow and algorithm 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”PollResize algorithm
Section titled “PollResize algorithm”now ← QuerySize()(platform winsize chain → env fallback)- If
now.columns != lastSize.columnsORnow.rows != lastSize.rows:lastSize ← nowmessages.Send(ConsoleMessage::Resize(now))(ignore send errors)
- Return
PollResizeHub (same fiber)
Section titled “PollResizeHub (same fiber)”Compare hub.lastSize to QuerySize(); on change update cache and invoke hub.OnResize(now) synchronously.
RunTick
Section titled “RunTick”Delegates to Platform.Terminal.PollResize then optional tick messages for controls—pairs with Console controls.
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