Description Goal Anchor
Outcome: UI Primitives SegmentedControl이 option ID union을 public generic contract로 보존하여 Calendar와 모든 ecosystem 소비자가 unchecked type cast 없이 값을 받는다.
Done: generic SegmentedControlOption<Id>와 SegmentedControl<Id>가 value/options/onValueChange를 같은 ID 타입으로 연결하고, Calendar 2곳·Date controls 1곳·Selection/Topology/Artifact 3곳의 총 6개 cast가 제거되며, owner tests·API reference·UI Primitives Usage·source registration·guard·실제 Calendar flow가 계약을 증명한다.
Don't: SegmentedControl의 DOM/ARIA/keyboard/focus/visual 동작, option labels/disabled semantics, Calendar view/scope 값, 다른 제품 상태는 변경하지 않는다.
현재 근거
owner: @interactive-os/json-document-ui-primitives-react의 SegmentedControl
API gap: value, option.id, onValueChange가 모두 string으로 고정되어 option ID union을 소실한다.
중복 보정 6곳: Calendar view/scope, Date controls grain, Selection mode, Topology order, Artifact kind가 callback에서 as cast를 수행한다.
같은 package의 Tabs<T>는 이미 generic ID contract를 제공하므로 canonical UI primitive 방향이 확인된다.
UI Primitives Usage는 SegmentedControl을 실행하지만 source registration에는 현재 symbol이 빠져 있다.
작업 범위
SegmentedControlOption과 SegmentedControl을 string-constrained generic으로 확장한다.
owner contract test가 literal union callback을 보존하고 keyboard/click 동작을 유지함을 증명한다.
총 6개 consumer cast를 제거한다.
generated API reference와 UI Primitives Usage 설명을 갱신하고 source registration에 SegmentedControl을 연결한다.
guard가 generic owner, consumer cast 제거, Usage/source closure를 검증하도록 추가한다.
package/Site/Calendar 실제 browser flow를 검증한다.
제외
calendar-search URL validation
Select, Tabs, 다른 control API 변경
option registry나 새 package 도입
선행 stacked PR merge
Reactions are currently unavailable
You can’t perform that action at this time.
Goal Anchor
SegmentedControl이 option ID union을 public generic contract로 보존하여 Calendar와 모든 ecosystem 소비자가 unchecked type cast 없이 값을 받는다.SegmentedControlOption<Id>와SegmentedControl<Id>가 value/options/onValueChange를 같은 ID 타입으로 연결하고, Calendar 2곳·Date controls 1곳·Selection/Topology/Artifact 3곳의 총 6개 cast가 제거되며, owner tests·API reference·UI Primitives Usage·source registration·guard·실제 Calendar flow가 계약을 증명한다.현재 근거
@interactive-os/json-document-ui-primitives-react의SegmentedControlvalue,option.id,onValueChange가 모두string으로 고정되어 option ID union을 소실한다.ascast를 수행한다.Tabs<T>는 이미 generic ID contract를 제공하므로 canonical UI primitive 방향이 확인된다.작업 범위
SegmentedControlOption과SegmentedControl을 string-constrained generic으로 확장한다.SegmentedControl을 연결한다.제외
calendar-searchURL validationSelect,Tabs, 다른 control API 변경