Task: session and boot region on v2 — session route, boot embeds session, ui/ useSession, translations, arrangement, notifications
Author: shariquerikCreated Sep 18, 2026Updated Sep 18, 2026
Labelswayfinder:task
Ticket of Desk v2 — REST API v2 everywhere. The shape is fixed in the session and boot grilling's resolution; do not re-open it. Wrapper: @framework/ui/api (PR #42947). Skills: /frappe-app-dev + /code-style for code, /quality-code-review in a fresh subagent before closing.
Question
Move the session and boot region onto v2 as ruled. Two PRs:
- Framework half on
develop:GET /api/v2/sessioninfrappe/api/v2.pyreturninguser(name,full_name,user_image,email),roles,lang,timezone,defaults; a Guest gets a Guest body, not a 401. Tests beside the other v2 route tests. Reachesdesk-v2by the sync map. - Desk and
ui/half ondesk-v2:frontend/src/boot.ts: boot throughrunMethod(..., { http: "GET" }); 401/403 fromApiError.statusto the unauthorized screen; boot body gainssession(the route's body) and drops top-leveluser,lang,sysdefaults,timezone; every other key stays; addsfile_chunk_sizeandmax_file_size. Updatefrappe/shell/boot.pyand everyboot.user/boot.langreader.ui/: exportSessionKeyanduseSession()with a one-shot wrapper fetch fallback; the desk providesboot.session. Notifications takefor_userfrom it,useUserRolesreadssession.roles,formatDefaultsreadssession.defaults(nowindow.sysdefaults).- Wrapper gains
getSession(),logout(),getTranslations(lang, version). frontend/src/addresses.ts: the shell's address table (frappe.shell.doctypes.get_addresses?v=…) throughrunMethod(..., { http: "GET" }), readingdatainstead ofmessage; the one-year cache header needs the GET (ruled in the remaining-functions grilling, 2026-09-18).frontend/src/i18n.ts: translations via the wrapper, still fire-and-forget.frontend/src/shell/session.ts:logout().frontend/src/arrangement.ts:runMethod, get as GET.- Notifications: rows via the list route, badge via the count route, mark-one-read as a PATCH with
read: 1, mark-all and hide-indicator asrunMethod, avatars as a User list. Pulse config asrunMethod.
Done when both PRs are merged, no /api/method literal or frappe-ui fetch primitive remains in the files above, and the review gates ran.
Source: frappe/frappe