Repository navigation
feat(console): quick-add a task from the workbench My tasks column - #39962
Draft
objectstack-fleet[bot] wants to merge 6 commits into
Draft
objectstack-fleet[bot] wants to merge 6 commits into
objectstack-fleet[bot] wants to merge 6 commits into
Conversation
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADHkmPhvd5XT8WTQ6Lu6ic
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADHkmPhvd5XT8WTQ6Lu6ic
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADHkmPhvd5XT8WTQ6Lu6ic
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADHkmPhvd5XT8WTQ6Lu6ic
The nine other packs gain workbench.tasks.emptyInvite and workbench.tasks.quickAdd.*; zh-Hant regenerated with gen:zh-hant. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADHkmPhvd5XT8WTQ6Lu6ic
…-grant map @object-ui/core gains the workbenchTaskQuickAdd row (create, asked of sys_task); WorkbenchTaskColumn reads it through resolveAffordance instead of its own can() read, and the census registers the create write site in WorkbenchTaskQuickAdd behind that row. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADHkmPhvd5XT8WTQ6Lu6ic
Contributor
Author
|
repo:objectstack@os-steve · os-steve · session_01ADHkmRM92nyNXbcm2LJn1N 席位核对ACCEPT · head L1 of PR #39962 (Refs #39873, the quick-add item), read on the full diff at
|
This branch has not been deployed
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.
Refs #39873
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
WorkbenchTaskQuickAdd(app-shell,console/workbench): an 「Add a task」 row under the 「My tasks」 list opens a small form — title, optional due time (the record form's date-time picker), assignee (the record form's person picker, defaulting to the signed-in person). Submit calls the console adapter'screate('sys_task', …), the same write path the record form uses, so validation, thestatusdefault and sharing apply unchanged; thennotifyDataChanged({ objectName: 'sys_task', recordId }), which the column's existinguseDataInvalidation('sys_task')read already listens to — the list re-reads in place, no new route and no new refetch mechanism.extractWriteErrorMessage).WorkbenchTaskColumn: mounts the quick-add only for a caller who may readsys_taskand for whom the newworkbenchTaskQuickAddrow of the affordance-to-grant map reads open (resolveAffordancein@object-ui/core: the create grant onsys_taskplus the object's create policy; before the grants load it reads open, the same convention the column'sreadcheck uses). For that caller the empty line becomes an invitation (workbench.tasks.emptyInvite); everyone else keeps the existingworkbench.tasks.emptyline.@object-ui/core:AFFORDANCE_GRANTSgainsworkbenchTaskQuickAdd: { crud: 'create', grant: 'create' }. The census inaffordanceGrantMap-12082.test.tsxgets the row's expectation and theWorkbenchTaskQuickAdd > submit :: createwrite site, mapped behind that row and read inWorkbenchTaskColumn.tsx.workbench.tasks.emptyInviteandworkbench.tasks.quickAdd.*in all eleven locale packs; zh-Hant regenerated from zh-Hans withgen:zh-hant.Tests
WorkbenchTaskColumn.test.tsx, new top-leveldescribe('WorkbenchTaskColumn quick-add'): empty list reads as the invitation and the form opens with the assignee preset to me; create sends{ title (trimmed), assignee_id, due_at }tosys_task, the column re-reads and lists the new row; no due time → nodue_atkey; assigning to someone else says where it went; a refused create keeps the title and shows the server words; Cancel drops what was typed; a caller without create permission gets no add row and the plain empty line. Three existing assertions now expect the invitation copy (the harness grants create by default).notifyDataChangedcall neutralised on disk, the create test goes red (the column never re-reads); restored from HEAD.Acceptance notes
WorkbenchHomePage.tsx, which another claim holds this round. The zone dispatches item 3 separately.Verification
Readings
Rework round 1 (head 2b54095):
pnpm --dir ui exec vitest runoverall-locales-key-parity,en-zh-key-parity,zh-hant-generated,affordanceGrantMap-12082andconsole/workbench/__tests__/-> Test Files 7 passed (7), Tests 152 passed (152).@object-ui/coreand@object-ui/app-shelltype-check exit 0. See the os-dev report comment on the card for the full gate list and exit codes.Read first (by risk):
WorkbenchTaskQuickAdd.tsx(submit— the create and the invalidation),WorkbenchTaskColumn.tsx(thecanQuickAddgate and the empty copy), the newdescribein the test file.Two-minute check: open the workbench home with no tasks assigned → the column reads 「Nothing on your list yet. Add your first task below.」; click 「Add a task」, type a title, press Enter → the task appears in the list with the pill at 1.
🤖 Generated with Claude Code
https://claude.ai/code/session_01ADHkmPhvd5XT8WTQ6Lu6ic