The Layr team can open Usage and see who is drawing, which sheets they open, and who has gone quiet. Admin, feedback, and usage now answer 404 for anyone who is not on the team, which closes the hole where any signed-in customer could read feedback. The addenda "replace a paragraph" design in this release is documentation only and does not change the product.
Open /admin/usage. People lists each person with markups drawn, sheets opened, sessions, active days, the tools they use, and a coaching line: New (first seen within 7 days), Quiet (no visit in 10 days, or never), or Active. Sort by who needs attention, who is most active, or who was seen last, and search by name or email. Click a person for the days or weeks, the tools, and the projects they touched. Overview shows new projects, markups drawn, sheets opened, and active users, with the previous period beside them, a chart, markups by tool, and a table by company. The range is last week, the last 4 weeks, or the last 12 weeks: whole Monday–Sunday weeks, in UTC, ending on the last Sunday that is already over. Customers only is on, so layrbuild.com and jakib.ai accounts stay out until you turn it off. Pick a company and both tabs narrow to it. Changing a control recomputes the page; it does not ask the server again. (#848, ENG-356)
/admin, /admin/feedback, a single feedback entry, and /admin/usage now answer 404 unless you are signed in with a layrbuild.com or jakib.ai email, or you hold the global admin role. A customer who was signed in used to be able to read every feedback entry. The usage API answers the same 404. A missing session, a missing profile, or a failed staff check all look like a missing page. The check runs in the admin layout and again at the top of each admin page, because a layout does not re-run when you move between those pages. (#848, ENG-356)
113_admin_usage.sql adds two read functions and no tables. admin_usage_markups counts markups that exist, per owner, project, UTC day, and tool, for a window. admin_usage_last_saved returns each person's latest layer save. Both are granted to the service role only; PUBLIC, anon, and authenticated cannot execute them. layrbuild.dev applied this file in the prepare job of deploy 39371816427 (the deploy for #848, commit 3f0c7b08). Production applies this same file when this release merges, through deploy.yml, before the new code. Do not apply it by hand, and do not edit the file.recharts (the Usage charts) and react-is (its peer). The deploy installs them. No feature flag changed.POSTHOG_PERSONAL_API_KEY is the server-only key Usage uses to read sheets opened, sessions, and last seen. It is reported set on production. Leave it unset and those figures show "—" with "PostHog is not connected"; markups, new projects, and the last layer save still load. If the key is set and the query fails, the screen says "PostHog could not be read" and the database figures still load. POSTHOG_API_HOST defaults to https://us.posthog.com and POSTHOG_ENVIRONMENT_ID defaults to 562752. The key is never sent to the browser.createdAt. A period that starts earlier reads "no data" for markups, and a markup with no stamp is not counted. A markup imported from a PDF (a Bluebeam externalId, or a uid recorded in page_imported_markups) is left out. A markup and the copy carried onto a superseded page count once. Deleted markups are gone, so the count is of markups that still exist.page_open with store_role main. Opening a spec does not count. A page_open sent before the browser identified the person stays anonymous and is not attributed. Events from localhost, 127.0.0.1, and [::1] are left out.layrbuild.com and jakib.ai. A global admin whose email is on another domain still appears, and is not labeled Team.tests/route-acl-enforcement.test.ts has two failures on /api/drawings list scoping. They fail on dev already and are not from this release.