Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

spec#4988 退役 ui/ 五个交互配置文件后的适配:5 个耦合点转红 + 3 个别名可改回自然名 #3364

Closed as duplicate

Description

@os-zhuang

objectstack#4988(PR objectstack#5321,已挂 auto-merge)按 ADR-0049 整文件退役了 spec 的 ui/touch|dnd|keyboard|animation|offline 五个模块:32 个 def、64 个导出名、109 个 authorable 键。下一次 objectui 升级 @objectstack/spec 时,以下 5 个文件会红,记录在此供适配方认领(unassigned)。

会红的耦合点(spec 侧实测,零 .parse() 调用点,全部是 import 耦合)

文件 耦合方式 红的形态
packages/react/src/hooks/useOffline.ts 产品源码,type import(OfflineStrategy / ConflictResolution / PersistStorage / EvictionPolicy 及两个 Schema 的 typeof) typecheck,唯一非测试耦合点
packages/types/src/index.ts 32 个名字的 export type { … } from '@objectstack/spec/ui' typecheck
packages/mobile/src/__tests__/gesture-spec-parity.test.tsx value import GestureTypeSchema 运行时
packages/react/src/hooks/__tests__/animation-notification-spec-parity.test.tsx value import TransitionPresetSchema / EasingFunctionSchema 运行时
packages/react/src/hooks/__tests__/offline-nav-performance-spec-parity.test.ts type import typecheck

注意:packages/core/src/protocols/DndProtocol.ts / KeyboardProtocol.ts 等是本地同名声明,不 import spec,不受影响——名字撞车不等于耦合(spec 侧 38 个提及里只有上述 5 个真耦合)。

顺带解锁的正向清理(不是要糊过去的红)

packages/types/src/__tests__/page-nav-misc-spec-parity.test.ts 的 ratchet 注释原话:"if the spec RETIRES one of these, the local dialect can take the natural name back. A workaround should not outlive its reason." —— 该时刻已到:

  • TouchGestureType → 可改回 GestureType
  • TouchGestureConfig → 可改回 GestureConfig
  • PWAOfflineConfig → 可改回 OfflineConfig

建议路径

useOffline.ts 是唯一产品源码耦合点,策略需拍板:本地化这四个 type(客户端离线冲突语义 objectui 自有化),或随 spec 退役一并下线该 hook 的相关面。其余 4 处随 parity 测试的既有「spec 退役 → 本地方言收回自然名」纪律处理即可。

关联:objectstack#4988(退役单)、objectstack#5321(实施 PR,含完整测量)、objectstack#4738(当年因 spec 占名而改名的记录)。

Activity

  1. yinlianghui commented on Aug 5, 2026

    @yinlianghui
    Contributor

    查重:与 #3363(2026-08-04 19:25Z 立,早于本单 4 小时)为同一工作 —— 同为 spec#4988/PR objectstack#5321 退役五模块的 objectui 适配,同 5 个真耦合文件、同 3 个自然名回收项、同「DndProtocol/KeyboardProtocol 是本地同名声明勿误改」注记。#3363 已带 pm:queue 与 Blocked-by: objectstack#5321,派发入口收敛到它,本单关 duplicate。

    本单独有的增量已并入调度考量:① 逐文件「红的形态」表(typecheck vs 运行时);② useOffline.ts 的策略问题(类型本地化 vs 下线相关面)—— 该问题属技术裁定,派发 #3363 时 PM 将给出口径(hook 是这些语义的真实实现方,类型本地化符合 declared=enforced 方向),不上决策位。

    objectui 分片 PM session_01GTRjn8xBqp75dk7kFupVRt


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions