Skip to content

Console AI approvals: show a lapsed pending action as Expired, not Rejected, in the chat card and the AI Approvals inbox #34255

Description

@objectstack-fleet

repo:cloud#1 · os-warren · session_01JQwxbYK6SZCmyzbGnrvmkk

Filing gate: ① the console half of objectstack-ai/cloud#4608 (maintainer ruling 6904228929 on that card: a lapsed item is shown as expired, not as rejected), named in the contract review of objectstack-ai/cloud PR #4647 (record 6905692497, S2). Dedupe: pending action expired lapsed approvals inbox finds no card.
Consumer: objectstack-ai/cloud#4608 (hosted and self-hosted in-app AI).

维护者速读

  • 要做的:AI 待确认操作 7 天没人处理会自动失效;聊天里的确认卡片和「AI 审批」收件箱要把这种条目显示为「已过期」,不是「已拒绝」。
  • 为什么:裁决 A(cloud#4608)明确要求显示为过期;现在界面会把它显示成「被拒绝,原因 lapsed」,看起来像是有人拒绝了。
  • 需要你做的:无。

Change

  • Since cloud#4608 an in-app AI pending action nobody decided within 7 days is stored status: 'rejected', rejection_reason: 'lapsed', decided_by empty (no new PendingActionStatus value).
  • The approve and reject doors answer such an item 409 RESOURCE_CONFLICT with error.details.reason: 'pending_action_lapsed'; GET /api/v1/ai/pending-actions[/:id] returns the row as above.
  • The chat's inline pending-approval card and the ai:approvals inbox render that row as "Rejected" with reason "lapsed", which reads as if the person refused it.
  • Ask (the console renders): when status === 'rejected' && rejection_reason === 'lapsed' && !decided_by, show "Expired" (not answered in time, or the proposer lost access) and no "Rejected by"; on a 409 with details.reason === 'pending_action_lapsed', show the same and refresh the item instead of a generic conflict error.
  • Done when both surfaces show "Expired" for a lapsed row and for the 409, with a test each; a person's own rejection (decided_by set) still shows "Rejected".

Reader: framework console lane (chat pending-approval card, ai:approvals inbox).

Activity

  1. added
    enhancement
    pm:queue
    on Nov 16, 2026
  2. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → domain:ui · p3 (pre-graded) · 2026-11-16T02:50Z

    ⛔ Not a claim.

    The console half of cloud#4608 (maintainer ruling 6904228929): a lapsed pending action shows as Expired, not Rejected, in the chat card and the AI Approvals inbox. The domain:ui label was added. p3 stands.

  3. added
    domain:ui
    area:ai
    on Nov 16, 2026
  4. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

    Claim: PM loop round 6 · 2026-11-28T09:16Z
    Picked by card-pick.mjs --order area:ai --seat repo:objectstack#2 at 2026-11-28T09:11Z, p3 close-out; the higher-ranked rows are cloud-repo, blocked, awaiting a maintainer ruling or a design choice, or waiting for the paused eval rounds. The maintainer in this seat's project, verbatim: 「ai 并发10」.
    Session: session_01L6bhgV6i8jfWwSXjpWJrjA
    Thread session: session_01L6bhgVC7KKvrgZyWpM75L8
    Account: os-sales
    Branch: claude/project-thread-ttee3l (from main)
    Domain: domain:ui
    Seat: repo:objectstack#2
    Area: s2-ai
    File surface: ui/packages/plugin-chatbot/src/AiPendingActionsInbox.tsx (the AI Approvals inbox), the chat's inline pending-approval card (ui/packages/app-shell/src/console/ai/ChatPane.tsx or the component it renders), the new label in the ui/packages/i18n locales, a test each; one changeset.
    Container & model: S, mode:thread, model: default tier — dispatch-gates.mjs --tier: "no path-derived mandate", effort: high (reason: the thread session serves effort high)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: a pending action nobody decided in time reads "Expired" in the console, not as if a person rejected it (maintainer ruling 6904228929 on cloud#4608).
    Thread-read: none
    Premise: the row shape is the one the card states (status: 'rejected', rejection_reason: 'lapsed', no decided_by; a 409 with details.reason: 'pending_action_lapsed'); no new status value and no server change. A person's own rejection still reads "Rejected".
    Serial constraints cleared: no open PR edits these files (seat read).

    The PR says Fixes #34255.

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 28, 2026
  6. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-sales · session_01L6bhgVC7KKvrgZyWpM75L8
    os-dev-report

    {
      "issue": 34255,
      "status": "done",
      "branch": "claude/project-thread-ttee3l",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/38246",
      "session": "session_01L6bhgVC7KKvrgZyWpM75L8",
      "premise_still_valid": true,
      "summary": "As claimed. One shared reader (ui/packages/plugin-chatbot/src/pendingActionLapse.ts): a row is lapsed when status is rejected, rejection_reason is lapsed and decided_by is empty; a decision answer is a lapse when it is HTTP 409 with error.details.reason pending_action_lapsed. The AI Approvals inbox badge (table, phone card, drawer) reads Expired for a lapsed row, the drawer drops Decided by and shows the reason, and a lapse 409 on approve or reject gives a neutral Expired outcome line instead of the conflict alert, with the hook's existing re-read turning the row Expired. The chat card: useHitlInChat sets a new ToolDecisionState value expired on the lapse 409, and both the generic approval strip and the record-write card draw Expired plus the reason. A row with decided_by still reads Rejected. Two new keys, aiApprovals.statusExpired and aiApprovals.expiredDetail, in all 11 packs (zh-Hant generated). Small calls listed in the PR body: the chat card learns of a lapse only from its own decision (no row read); onDecided gets the usual synthesized failed envelope with error pending_action_lapsed.",
      "tests": "New: AiPendingActionsInbox.lapsed-34255.test.tsx (2 tests) and ChatbotEnhanced.lapsedApproval-34255.test.tsx (3 tests), both in zh: 2 files passed, 5 tests passed. Ablation: both predicates in pendingActionLapse.ts forced false on disk, 3 failed / 2 passed, exit 1, restored with git checkout. Package runs: vitest packages/plugin-chatbot/ packages/i18n/ packages/app-shell/src/console/ai/ packages/app-shell/src/assistant/ gave 226 files passed and 2 failed on a missing @objectstack/client dist while the dependency build was running; after the build (exit 0) those 2 files re-run 2 passed, 49 tests. type-check for @object-ui/plugin-chatbot and @object-ui/i18n exit 0; eslint --no-inline-config on the 9 changed plugin-chatbot files exit 0 (1 existing warning, untouched line).",
      "gates": "Local at a91ac87d6: dispatch-gates.mjs --commands derived 41; 40 exit 0 in the sequential loop, pnpm --dir ui exec vitest run scripts/ exit 1 there (killed by SIGKILL part-way), re-run alone exit 0 (172 files passed, 2 skipped). --ran: 41 accounted for, 41 run, 0 NOT-MEASURED. Outside the list: ui check:i18n-keys, check:i18n-drift, check:i18n-dead-keys exit 0; root check:i18n-stale-fill exit 0; root check:i18n, check:i18n-coverage, check:i18n-walk-parity exit 3 (prerequisite: full build), NOT MEASURED. CI at a91ac87d6 when this was written: 13 skipped, 17 in_progress, 0 failed.",
      "dogfood_battery": "n/a - no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "0 writes (one get_session read)",
      "api_writes": "3 - fleet-write relay pr_create (POST pulls + POST issues/38246/assignees); fleet-write relay pr_request_reviewers (POST pulls/38246/requested_reviewers); this os-dev-report comment (POST issues/34255/comments)",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none - a chat approval card rehydrated after its item lapsed shows its buttons until pressed (it never reads the row); in the PR's Small calls, not filed",
        "carrier: cloud - the open edition's AI service does not lapse items (no pending_action_lapsed in packages/); noted in Acceptance notes"
      ]
    }

    Generated by Claude Code

  7. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

    Claim amendment · 2026-11-28T09:58Z · amends claim 7237134153

    Writes: Clause-②: yes (widening). ToolDecisionState, exported from @object-ui/plugin-chatbot's public entry and read and passed by hosts (useHitlInChat().decisions, ChatbotEnhancedProps.toolDecisions), gains the member expired. The changeset stays patch and Metadata-protocol: none stands. Every other line of the claim stands.

    Reason: the declaration review on PR #38246 (FAIL, must-fix on the Clause-②: line) found the widening; the same type's held member came in under Clause-②: yes (widening). The claim's no was the seat's misreading of a console-only change.

  8. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-sales · session_01L6bhgVC7KKvrgZyWpM75L8
    os-dev-report

    {
      "issue": 34255,
      "status": "done",
      "round": "2 - answers contract review 7237583182 (M1, S2, N1) and claim amendment 7237596355",
      "branch": "claude/project-thread-ttee3l",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/38246",
      "session": "session_01L6bhgVC7KKvrgZyWpM75L8",
      "premise_still_valid": true,
      "summary": "Round 2 at head a86714648: the changeset declares Clause-② yes (widening) with a note that ToolDecisionState gains expired and the two locale keys (PR body patched to the same, r2); a new inbox test pins a lapsed row whose decided_by is null or an empty string; the rehydrated-card gap is carried by #38250. Round 1, unchanged: As claimed. One shared reader (ui/packages/plugin-chatbot/src/pendingActionLapse.ts): a row is lapsed when status is rejected, rejection_reason is lapsed and decided_by is empty; a decision answer is a lapse when it is HTTP 409 with error.details.reason pending_action_lapsed. The AI Approvals inbox badge (table, phone card, drawer) reads Expired for a lapsed row, the drawer drops Decided by and shows the reason, and a lapse 409 on approve or reject gives a neutral Expired outcome line instead of the conflict alert, with the hook's existing re-read turning the row Expired. The chat card: useHitlInChat sets a new ToolDecisionState value expired on the lapse 409, and both the generic approval strip and the record-write card draw Expired plus the reason. A row with decided_by still reads Rejected. Two new keys, aiApprovals.statusExpired and aiApprovals.expiredDetail, in all 11 packs (zh-Hant generated). Small calls listed in the PR body: the chat card learns of a lapse only from its own decision (no row read); onDecided gets the usual synthesized failed envelope with error pending_action_lapsed.",
      "tests": "Round 2: the two files 6 passed; ablation of the null/empty case (!row.decided_by mutated to row.decided_by === undefined) 1 failed / 2 passed in the inbox file, restored; type-check @object-ui/plugin-chatbot exit 0, eslint on the test file exit 0. Round 1 at a91ac87d6: New: AiPendingActionsInbox.lapsed-34255.test.tsx (2 tests) and ChatbotEnhanced.lapsedApproval-34255.test.tsx (3 tests), both in zh: 2 files passed, 5 tests passed. Ablation: both predicates in pendingActionLapse.ts forced false on disk, 3 failed / 2 passed, exit 1, restored with git checkout. Package runs: vitest packages/plugin-chatbot/ packages/i18n/ packages/app-shell/src/console/ai/ packages/app-shell/src/assistant/ gave 226 files passed and 2 failed on a missing @objectstack/client dist while the dependency build was running; after the build (exit 0) those 2 files re-run 2 passed, 49 tests. type-check for @object-ui/plugin-chatbot and @object-ui/i18n exit 0; eslint --no-inline-config on the 9 changed plugin-chatbot files exit 0 (1 existing warning, untouched line).",
      "gates": "Round 2 at a86714648: the same 41 derived families, each exit 0 in one sequential loop; --ran 41 run, 0 NOT-MEASURED (a DERIVED zero). CI at a86714648 when this was written: 1 failure, 7 in_progress, 15 skipped, 38 success. Round 1 local at a91ac87d6: dispatch-gates.mjs --commands derived 41; 40 exit 0 in the sequential loop, pnpm --dir ui exec vitest run scripts/ exit 1 there (killed by SIGKILL part-way), re-run alone exit 0 (172 files passed, 2 skipped). --ran: 41 accounted for, 41 run, 0 NOT-MEASURED. Outside the list: ui check:i18n-keys, check:i18n-drift, check:i18n-dead-keys exit 0; root check:i18n-stale-fill exit 0; root check:i18n, check:i18n-coverage, check:i18n-walk-parity exit 3 (prerequisite: full build), NOT MEASURED. CI at a91ac87d6 when this was written: 13 skipped, 17 in_progress, 0 failed.",
      "dogfood_battery": "n/a - no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "0 writes (one get_session read)",
      "api_writes": "round 2: 2 - fleet-write relay issue_patch on #38246 (PATCH pulls/38246 body, r2); this os-dev-report comment. Round 1: 3 - fleet-write relay pr_create (POST pulls + POST issues/38246/assignees); fleet-write relay pr_request_reviewers (POST pulls/38246/requested_reviewers); this os-dev-report comment (POST issues/34255/comments)",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: #38250 - a chat approval card rehydrated after its item lapsed shows its buttons until pressed (it never reads the row); in the PR's Small calls",
        "carrier: cloud - the open edition's AI service does not lapse items (no pending_action_lapsed in packages/); noted in Acceptance notes"
      ]
    }

    Generated by Claude Code

  9. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-sales · session_01L6bhgVC7KKvrgZyWpM75L8
    os-dev-report

    {
      "issue": 34255,
      "status": "done",
      "round": "3 - head e3c122b92; round 2 answered contract review 7237583182 (M1, S2, N1) and claim amendment 7237596355; delta review PASS at e3c122b92",
      "branch": "claude/project-thread-ttee3l",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/38246",
      "session": "session_01L6bhgVC7KKvrgZyWpM75L8",
      "premise_still_valid": true,
      "summary": "Round 3 at head e3c122b92: CI Build & E2E UI was red at a86714648 because ui/e2e/ai-approvals-inbox-phone-35449.spec.ts reads the inbox source by regex for the old StatusBadge status={row.status} call; its badge extractor now matches StatusBadge row={row} (same class, same shrink-0 requirement). PR body r2 patched again (gate block at e3c122b92, the e2e file listed). Round 2 at head a86714648: the changeset declares Clause-② yes (widening) with a note that ToolDecisionState gains expired and the two locale keys (PR body patched to the same, r2); a new inbox test pins a lapsed row whose decided_by is null or an empty string; the rehydrated-card gap is carried by #38250. Round 1, unchanged: As claimed. One shared reader (ui/packages/plugin-chatbot/src/pendingActionLapse.ts): a row is lapsed when status is rejected, rejection_reason is lapsed and decided_by is empty; a decision answer is a lapse when it is HTTP 409 with error.details.reason pending_action_lapsed. The AI Approvals inbox badge (table, phone card, drawer) reads Expired for a lapsed row, the drawer drops Decided by and shows the reason, and a lapse 409 on approve or reject gives a neutral Expired outcome line instead of the conflict alert, with the hook's existing re-read turning the row Expired. The chat card: useHitlInChat sets a new ToolDecisionState value expired on the lapse 409, and both the generic approval strip and the record-write card draw Expired plus the reason. A row with decided_by still reads Rejected. Two new keys, aiApprovals.statusExpired and aiApprovals.expiredDetail, in all 11 packs (zh-Hant generated). Small calls listed in the PR body: the chat card learns of a lapse only from its own decision (no row read); onDecided gets the usual synthesized failed envelope with error pending_action_lapsed.",
      "tests": "Round 3: the e2e spec not run locally (it builds the console first); its 23 inbox source extractors were tried against the new source by script, 23 matched, 0 missed; CI Build & E2E UI success at e3c122b92. Round 2: the two files 6 passed; ablation of the null/empty case (!row.decided_by mutated to row.decided_by === undefined) 1 failed / 2 passed in the inbox file, restored; type-check @object-ui/plugin-chatbot exit 0, eslint on the test file exit 0. Round 1 at a91ac87d6: New: AiPendingActionsInbox.lapsed-34255.test.tsx (2 tests) and ChatbotEnhanced.lapsedApproval-34255.test.tsx (3 tests), both in zh: 2 files passed, 5 tests passed. Ablation: both predicates in pendingActionLapse.ts forced false on disk, 3 failed / 2 passed, exit 1, restored with git checkout. Package runs: vitest packages/plugin-chatbot/ packages/i18n/ packages/app-shell/src/console/ai/ packages/app-shell/src/assistant/ gave 226 files passed and 2 failed on a missing @objectstack/client dist while the dependency build was running; after the build (exit 0) those 2 files re-run 2 passed, 49 tests. type-check for @object-ui/plugin-chatbot and @object-ui/i18n exit 0; eslint --no-inline-config on the 9 changed plugin-chatbot files exit 0 (1 existing warning, untouched line).",
      "gates": "Round 3 at e3c122b92: the same 41 derived families, each exit 0; --ran 41 run, 0 NOT-MEASURED (a DERIVED zero). CI at e3c122b92: 58 check-runs, 45 success, 13 skipped, 0 failed, 0 pending, including all 16 Test UI shards, Build & E2E UI and Type Check UI. Round 2 at a86714648: the same 41 derived families, each exit 0 in one sequential loop; --ran 41 run, 0 NOT-MEASURED (a DERIVED zero). CI at a86714648 when this was written: 1 failure, 7 in_progress, 15 skipped, 38 success. Round 1 local at a91ac87d6: dispatch-gates.mjs --commands derived 41; 40 exit 0 in the sequential loop, pnpm --dir ui exec vitest run scripts/ exit 1 there (killed by SIGKILL part-way), re-run alone exit 0 (172 files passed, 2 skipped). --ran: 41 accounted for, 41 run, 0 NOT-MEASURED. Outside the list: ui check:i18n-keys, check:i18n-drift, check:i18n-dead-keys exit 0; root check:i18n-stale-fill exit 0; root check:i18n, check:i18n-coverage, check:i18n-walk-parity exit 3 (prerequisite: full build), NOT MEASURED. CI at a91ac87d6 when this was written: 13 skipped, 17 in_progress, 0 failed.",
      "dogfood_battery": "n/a - no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "0 writes (one get_session read)",
      "api_writes": "round 3: 2 - fleet-write relay issue_patch on #38246 (PATCH pulls/38246 body); this os-dev-report comment. Round 2: 2 - fleet-write relay issue_patch on #38246 (PATCH pulls/38246 body, r2); this os-dev-report comment. Round 1: 3 - fleet-write relay pr_create (POST pulls + POST issues/38246/assignees); fleet-write relay pr_request_reviewers (POST pulls/38246/requested_reviewers); this os-dev-report comment (POST issues/34255/comments)",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: #38250 - a chat approval card rehydrated after its item lapsed shows its buttons until pressed (it never reads the row); in the PR's Small calls",
        "carrier: cloud - the open edition's AI service does not lapse items (no pending_action_lapsed in packages/); noted in Acceptance notes"
      ]
    }

    Generated by Claude Code

  10. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

    Landed · 2026-11-28T12:11Z

    PR #38246 merged at 2026-11-28T11:15Z through the merge queue on the seat's ACCEPT (7238164703), and its Fixes line closed this card. What changed:

    It was never ejected. pm:dispatched is cleared on this card.

  11. removed
    pm:dispatched
    on Nov 28, 2026
  12. added 3 commits that reference this issue on Dec 1, 2026
    6123f2b
    b503291
    c6a1328
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:aidomain:uienhancementpriority:p3

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions