Repository navigation
feat(web-forms): a guest cannot open a Critical case; guest-facing support form labels and hotline hint (#2368) - #2378
Merged
Conversation
…o guest-chosen priority (#2368) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAmA6c9KrsMQiv9s7ak
…a Critical case (#2368) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAmA6c9KrsMQiv9s7ak
…t priority cap in the Service Manual and the Cases page (#2368) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAmA6c9KrsMQiv9s7ak
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Author
席位核对Verdict: ACCEPT ·
Generated by Claude Code |
This was referenced Oct 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Irene · project thread
Fixes #2368
Clause-②: no
Metadata-protocol: none
维护者速读
/forms/support)不再让访客选择优先级,网页工单按默认「低」进入;即使有人绕过表单直接提交「严重」,应用也最多存为「高」,不会触发升级和服务经理通知。表单顶部加了「紧急故障请拨打服务热线。」,姓名和邮箱字段改为「您的姓名」「您的邮箱」(英、中、西、日四种语言)。服务手册和工单文档同步说明。src/service/objects/case.hook.ts(第 212 行,访客分支里的 critical → high)、src/service/views/case.view.ts(web_to_case 表单:去掉 priority、热线提示、访客标签)、test/web-to-case-guest-priority.test.ts(新)。pnpm exec vitest run test/web-to-case-guest-priority.test.ts,预期 5 个用例全部通过;或未登录打开/_console/f/support,应看到没有「优先级」字段、顶部有热线提示。What changes
Every row was measured on
origin/main495bff5 (@objectstack 18.2.0) before it was edited.options: [low, medium, high]onweb_to_case.priorityparses, andGET /api/v1/forms/supportserves it, but the public renderer at/_console/f/supportstill listed Low, Medium, High, Critical (screenshotprobe-form-option-subset-ignored-en.png). The door validates a posted value against the object's options only (@objectstack/rest18.2.0registerFormEndpointsfilters keys by the form's field list and checksrequired, nothing else). Platform finding, below.priorityis off the public form. The door's allow-list now drops a postedpriority, and the case takes the object defaultlow.src/service/views/case.view.ts:550(comment where the row was)priority: critical201, storedcritical,status: escalated,is_escalated: true,escalation_reason: "Auto-escalated: critical priority", rank 4, 4-hour SLA. After:201, storedlow,status: new, not escalated, rank 1.case_sla_defaultsturns a guest'scriticalintohighbefore the rank, the SLA row and every after-insert flow read it. Capped because the visitor's case is real: refusing it loses the case to save a staff re-triage, and the hotline hint covers a real P1. Measured with the subset form still in place: the door answered201and storedhigh, not escalated.src/service/objects/case.hook.ts:212case_escalation_on_createstarts only onpriority == "critical"(no run row for a capped case); the service-manager hand-off rides on the escalation; Escalated Cases Sharing and the dashboard tile readcritical; the SLA row is read after the cap (high×smb). Tested: no run, no notification to aservice_managerholder, owner not handed to the pool.test/web-to-case-guest-priority.test.tscriticaland escalates (tested here and inflow-record-change).case.view.ts:521, four packs_sections.how_can_we_help.descriptioncase.view.ts:534-535, packs_sections.how_can_we_help.fields.supplied_*.label@objectstack/console18.2.0ui-components-*.js:placeholder: s?.placeholder || '0.00'), on every currency input. A per-rowplaceholderwould hide it here, but AGENTS.md rule 4 says a bad platform default is fixed at the default, so no change.{ id }only;submitBehaviorthank-youtakes a plaintitle/messagethat the renderer prints as is (no{{record.x}}interpolation, onlyredirectinterpolates); andsubmitBehavioris not translated, so a custom message would show English to a zh visitor. No change.Also in this PR:
src/service/docs/crm_service_cases.md+.zh.md): new section on the public support form, the priority cap and the hotline hint. Docs sitecontent/docs/service/cases.mdx(+ zh-Hans, zh-Hant): five fields not six, the visitor labels, the priority cap and the hint.Tests
test/web-to-case-guest-priority.test.ts(5): the form declares no priority while the staff form keeps it; the door drops a posted critical (stored low, nothing escalates, no run ofcase_escalation_on_create, no notice to the service manager); the guest branch caps critical at high with rank 3 and nothing on the escalation path; a guest's high/medium/low are left alone; a staff critical still escalates.case-sla-matrix: the anonymous-critical case now expects the cap and the High × SMB row; the no-account critical case runs as staff.flow-escalation-ownerless-case: the insert-time twin is driven by an ownerless SYSTEM insert (newsystemInserthelper besidesystemUpdate), since a guest can no longer be born critical.case-create-form-narrowing: the public form's field set no longer haspriority.case-guest-branch-leftovers: header re-read for the new field list (comments only).Ablations (each reverted on disk by an exact-anchor replace, run, restored with
git checkout HEAD --,git diff HEADempty after):Acceptance notes
/_console/f/supportwith a form rowoptionssubset renders all four object options (screenshot), andPOST /api/v1/forms/support/submitaccepts a value outside the row subset · no per-form option filter on 18.2.0 · dedupe words: public form option subset, form field options ignored, anonymous form select options.{ id },thank-youtext has no interpolation and is not translated · dedupe words: thank-you message record number, submitBehavior translation.Verification
pnpm verify at 486d3f5
CI runs coverage and e2e.
The anonymous door on a dev boot (objectstack dev, 18.2.0)
Screenshots, signed out (project files issue-2368/)
before-support-en, before-support-zh-CN, before-support-priority-open-en, before-support-thank-you-en, before-contact-us-en, before-contact-us-zh-CN, after-support-en, after-support-zh-CN, after-support-thank-you-en, after-contact-us-en, after-contact-us-zh-CN, probe-form-option-subset-ignored-en.
🤖 Generated with Claude Code
https://claude.ai/code/session_01J8VVAmA6c9KrsMQiv9s7ak