跳到正文
Skillpedia
网站与界面(前端)75k · #3018

session-timeout-recovery

它能做什么

这个技能检查登录后的流程和长表单中可能导致工作丢失的超时情况,并添加提醒、保存进度以及登录后恢复功能。它面向开发账户、结账和编辑器的团队。

适用场景

  • ✓你请智能体检查登录流程或长表单在超时时是否会丢失数据的时候。
  • ✓用户的会话过期后,他们正在填写的表单丢失了的时候。
  • ✓你在构建编辑器或结账流程,并希望在会话结束前提醒用户的时候。

技能链接

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/session-timeout-recovery/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/session-timeout-recovery/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“用户的会话超时时,他们正在填写的表单会丢失。请帮我添加提醒并保存他们的进度吗?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会检查会话的持续时间,并在过期前添加无障碍的提醒。它会保存草稿或已输入的数据,在允许的情况下让用户延长会话,并在用户重新登录后让其回到同一步骤。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Prevent data loss from session timeouts

Users with cognitive, motor, or vision disabilities may need longer to finish forms and authenticated tasks. Silent session expiry can erase work, force a restart, and block completion of important transactions.

Quick Reference

  • Warn users before a timeout causes lost work
  • Allow time extension for content-controlled time limits when feasible
  • Autosave or preserve entered data across logout and re-authentication
  • Keep timeout dialogs keyboard accessible and announced to assistive technology

Check

Review authenticated flows, forms, and long-running tasks for inactivity timeouts. Verify users are told the timeout duration, warned before expiry, can extend the session when allowed, and can resume after re-authenticating without losing work.

Fix

Add an accessible timeout warning, preserve drafts or submitted data across session expiry, and restore the user to the same step after re-authentication. Where the time limit is content-controlled, offer turn off, adjust, or extend behavior when feasible.

Explain

Explain how timeout warnings, extension controls, autosave, and re-authentication recovery reduce data loss and align with WCAG enough-time guidance.

Code Review

Review authenticated forms, checkout flows, editors, and long-running tasks related to Prevent data loss from session timeouts. Flag routes or components that can expire silently, discard entered data, or block recovery after re-authentication.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/accessibility/session-timeout-recovery

常见问题

谁最能从中受益?

这个技能说,有认知、运动或视力障碍的人可能需要更多时间,而无声的过期会抹去他们的工作。

提醒需要具有无障碍性吗?

需要。这个技能说,对话框必须能用键盘操作,并且要向辅助技术播报。

时间限制可以延长吗?

这个技能说,在内容设定了时间限制且可行的情况下,应提供关闭、调整或延长的选项。

详情

作者的原始描述

Use when reviewing authenticated user flows or long forms. Check both client and server behavior: warning timing, dialog accessibility, autosave frequency, timeout extension, and post-login state restoration.

repo: thedaviddias/Front-End-Checklist

热度

GitHub 星标
75k
排名
#3018
许可证
MIT
更新时间
2026/10/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能