Install any skill in seconds. Free to start, no credit card required.
Get Started Free →ai-shifu/listen-mode-slide-mobile-integration
当 learner 端听课模式需要接入 markdown-flow-ui 的移动端播放器新能力时使用本技能。覆盖横竖屏状态透传、自定义横屏 header、以及播放器文案国际化接入。
Passed 18 of 22 test cases with the skill, and 9 of 22 without it.
and 14 more in the full report
10 fixed9 passed either way4 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 10 test cases the skill fixed. Same model, same prompt, with and without the skill.
A floating action entry point needs to reposition itself when switching between mobile slide view modes. Should view mode state be hoisted to the top-level page state or consumed in ListenModeSlideRenderer?
| Checked | Without skill | With skill |
|---|---|---|
| Recommends consuming onMobileViewModeChange locally in ListenModeSlideRenderer | Missed | Passed |
| Directs using a CSS modifier class to adjust positioning rather than hoisting state further up | Missed | Passed |
The instructions your model reads when the skill loads.
ListenModeSlideRenderer 这一层完成 Slide 新 props 的业务接入,再按需把状态回调向 NewChatComp、ChatUi、页面层逐层透传。markdown-flow-ui。src/i18n/<locale>/modules/chat.json,不要在组件里写死字符串。aria-label 也必须走 module.chat 命名空间;共享 TS 模块只保留 mode 和 i18n key,禁止导出已经翻译好的“听课/阅读”等渲染文案。t('module.chat.xxx') 这类字面量调用;不要只导出 key 常量再在调用方 t(dynamicKey),否则 check_translation_usage.py 的静态扫描会把文案误判为未使用。Slide 新增 playerTexts.subtitleLabel、playerTexts.subtitleToggleAriaLabel 这类播放器字幕文案时,ai-shifu 侧也要在 ListenModeSlideRenderer 同步透传,并补齐 chat.json 与 i18n-keys.d.ts,避免 history slide 设置面板回退到英文。markdown-flow-ui 发布版类型暂未同步,使用 src/web/src/types/markdown-flow-ui.d.ts 做最小化 module augmentation,避免覆盖上游完整声明。useCourseStore,章节/课时标题优先复用当前 lessonTitle 或 sectionTitle,不要在聊天组件里重复请求课程信息。useCourseStore 的 courseAvatar/courseName,并把 header 高度抽成共享 CSS 变量,避免 page、NavDrawer、ChatUi 各自写死不同高度。module.chat 下的独立 i18n key(例如“听 / 读”)。当前 LearningModeSwitch 是不带状态徽标的统一实现,不要假设 learner header 仍有 BETA badge;若产品重新要求状态标记,应在现有共享开关内设计并补齐测试,而不是引用已经删除的 badge 组件。learningModeOptions 中的选项顺序,让移动端和桌面端一起复用同一套展示顺序,不要在单个组件里额外写条件分支。desktop 尺寸变体做定向覆盖,不要回退成桌面端单独实现。courseId 维度使用 localStorage 保存,并把“读取缓存决定初始模式”和“用户切换后回写缓存”都收敛在学习页 layout 或共享 storage helper 中,避免按钮组件直接耦合存储细节。ListenModeSlideRenderer 本地消费 onMobileViewModeChange 维护 view mode,再用 modifier class 做定位差异,不要把这种纯展示状态继续上抛到更多层。onMobileViewModeChange 这类上抛回调并逐层透传时,中间层组件优先保持可选参数,并为页面层保留安全退化,避免只改一半导致 next build 在 JSX 调用点直接报 props 缺失。Slide 内部视口,业务层要为 portal 容器尚未就绪的首帧提供回退渲染,避免按钮因容器时序问题直接消失。Slide 的 fullscreen 态来自“设备自动检测 + 用户手动切换”混合模型,业务层消费 onMobileViewModeChange 时应以“当前生效态”为准,不要再额外假设物理横屏一定不可退出。dvh 视口误差时,优先在页面根节点切换 class,并通过全局 CSS 变量统一把相关高度从 dvh 映射到 vh,不要在多个组件里散落同一套条件判断。page 或宿主层是否把键盘触发的 resize / visualViewport.resize 当成横竖屏变化处理;输入框聚焦期间应过滤这类 resize,避免整页布局状态重算导致浮层或输入组件重渲染。ListenModeRenderer.scss 约束 slide 外层 flex/grid 链路的 min-width: 0、max-width: 100% 和局部 overflow-x,让代码块内部滚动,不要先改 markdown-flow-ui。Slide 的新增能力已经在 markdown-flow-ui 暴露,重点核对 fullscreenHeader、playerTexts、onMobileViewModeChange 的真实类型。markdown-flow-ui 已把移动端模式字段从 landscape / portrait 改为 fullscreen / nonFullscreen,ai-shifu 侧的 handler、props、state 与文案字段也要同步换名,例如 onListenMobileViewModeChange、mobileViewMode、fullscreenHeader、fullscreenLabel、nonFullscreenLabel。dvh/vh 计算,优先把 fullscreen + landscape + mobile 的命中条件收敛到页面根节点 class,再由全局变量驱动页面与弹层样式。chat i18n 命名空间,并同步更新生成型的 key 类型文件。test cases passed, vs 9 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.