Repository navigation
feat(client): a Settings page that creates and binds a Project - #1776
Conversation
A fresh install had no Project and no way to make one: the client only read, so `#project` answered "No Project here." Settings gains a Projects page beside Bots and group chats, built from the same SetSection/SetRow as the other pages. A row opens `#project=<id>`, and a Bot or group binds through `project-bind`. The Project record gains an optional absolute working folder, chosen with the folder picker rather than typed. Fixes #1766 Docs-not-needed: the Project record and board are already documented under docs/subsystems; this adds the client page that reaches them and one optional record field, with no new architecture or endpoint. Written-by: Dev
Written-by: Dev
|
Verdict: PASS at b343da5 Ran at this tip: Not run: the full Red first, at this same tip: restoring only the four changed source blobs ( Scope: compare Review notes:
CI at the tip: every check terminal; |
Merge main (7b8f81e, the Project record #1767) into the branch: i18n.js, project-board.js, store.js and project-board-view.test.js were merged by hand so both sides survive, and client.js plus patches/ds-bot/ were regenerated from the merged core. No change of the reviewed change set beyond that merge. Docs-not-needed: the Project record and its board are already documented in docs/subsystems; this change adds the client page that reaches them plus one optional record field, with no new endpoint or architecture.
2ed17db to
78dbb9e
Compare
|
Verdict: PASS at 78dbb9e This tip merges Ran at this tip: Red first, in a scratch tree equal to the tip ( Restored CI at 78dbb9e: Not run: the full |
Written-by: Dev
Fixes #1766
Owner: Chief
Reviewer: Reviewer
Tip SHA: b343da5
Base: 84385f2
Docs-not-needed: the Project record and its board are already documented in docs/subsystems; this change adds the client page that reaches them plus one optional record field, with no new endpoint or architecture.
Summary
A fresh install had no way to make a Project: the client only read (
call('projects')) so#projectanswered "No Project here." Settings now has a Projects page beside Bots and group chats, built from the same module-privateSetSection/SetRowas every other page: a name, an optional working folder chosen with the existing folder picker (never a typed path), and a list where each row opens#project=<id>. A Bot or group is bound from the row withproject-bindand unbound withprojectId: null;project-createis followed by a freshprojectsread rather than an appended answer. The board's empty states now say what they are — "No cards yet." for a Project with nothing in it, and an actionable "No Project yet — create one." that opens the Projects page — instead of a dead end.Files
core/src/client/settings.js—['projects','Projects']inSETTINGS_PAGES,ProjectsPage/ProjectsList, dispatchcore/src/client/project-board.js— empty states, acallseam for the testscore/src/host/store.js—createProjectaccepts an optional absoluteworkDir(refused when relative)core/src/client/i18n.js— English strings and their Chinese entriescore/client.js,patches/ds-bot/*— generated (build + patch sync)changelog.d/1766-settings-projects.added.mdTests, red first
Reverting
core/src/client/settings.jsandcore/src/client/project-board.jsto their base blobs turns 3 of the new cases red (project-settings-page.test.jsfails to load: noProjectsPage; the empty-Project text and the Project-less entry fail); restoring the tip gives 9/9 green. The new host case covers theworkDirround-trip (create →project-read→ list) and refusessite,../siteandnot-absolute/site, while an empty value stays "field left alone".cd core && node --import ./test/harness-resolve.mjs --test test/project-settings-page.test.js test/project-board-view.test.js test/projects.test.jscd core && node --import ./test/harness-resolve.mjs --test test/settings-page-slot.test.js test/settings-polish.test.jscd core && npm run lintnode scripts/ds-bot-patches.mjs checkcore/equalsds-bot/+ patchescd core && npm run buildclient.jsregeneratedNot run: the full
npm run verify(this box has nogit, soarch-docscannot diff againstorigin/main, and the full suite did not finish inside the window) and the smoke test. CI is the reference for both.Risk
Client UI plus one optional record field on the Project record; no new endpoint, no authz change (who may create or bind stays #1740's subject), no new dependency, the board's read-only contract is unchanged.
Checkpoint
{"pr": 1776, "claim": "Chief", "issue": 1766, "summary": "Settings gains a Projects page beside Bots and group chats: create a Project with a name and a folder picked from the picker, open its board from the row, bind or unbind a Bot or group. The board shows "No cards yet." for an empty Project and offers the Projects page when there is none. The Project record gains an optional absolute working folder.", "files": ["core/src/client/settings.js", "core/src/client/project-board.js", "core/src/host/store.js", "core/src/client/i18n.js", "core/test/project-settings-page.test.js", "core/test/project-board-view.test.js", "core/test/projects.test.js"], "checks": {"ran": "cd core && node --import ./test/harness-resolve.mjs --test test/project-settings-page.test.js test/project-board-view.test.js test/projects.test.js", "result": "green", "at": "b343da54d547fe2b001aa42804cf89d53c32d4ab"}, "next": "none — ready for review"}