Notifications and settings
The lawyer's notification feed, where its items come from and how they are stored, and the shared Settings screen as a lawyer sees it.
Where it lives
| Route | View file | Access |
|---|---|---|
/legal/notifications | src/views/lawyer/notifications/lawyer-notifications.tsx | lawyer |
/legal/settings | src/views/lawyer/settings/lawyer-settings.tsx, which renders src/views/app/settings/settings.tsx unchanged | lawyer |
/legal/settings?section=security | same screen with a section pre-selected | lawyer |
Supporting code: the socket subscriber in src/main.tsx, storage helpers in src/lib/notifications.ts, and the bell in src/components/topbar.tsx.
Before you start
- Signed in with the
LAWYERrole. - Notifications are only collected while the app is open in the browser and the notification socket is connected.
Flow
How a notification arrives
- When the app loads with a signed-in user, it opens a socket.io connection to the API, emits
notifications:subscribeand listens fornotifications:new. - The API sends
notifications:newto the user's own socket room whenever it creates an in-app notification for them. - The app turns the event into a stored item (id, category, title, body, a time label such as "Nov 25, 3:09 PM", unread) and saves it in the browser's local storage under the key
notifications, tagged with the audiencelegal. - An item with the same id replaces the older copy, and the newest item goes to the top.
- The bell's red badge shows the number of unread items (capped at "99+").
For a lawyer the category is chosen from the event type:
| Event type from the API | Typical title | Category tab |
|---|---|---|
lawyer_assigned | "New Legal Assignment" | Assignments |
lawyer_documents_submitted | "New Documents to Review" | Assignments |
lawyer_review_started, lawyer_verification_completed, lawyer_changes_requested | These go to the lister, not the lawyer | Assignments (mapping exists, but a lawyer does not receive them) |
Any other event whose type is messages | varies | Messages |
| Everything else | varies | Security |
The feed is local to one browser
The page never asks the API for past notifications. It shows only what this browser received over the socket and saved. Anything sent while the lawyer was signed out, on another device, or before the page was last fully loaded does not appear, and clearing site data empties the feed.
Read the feed
- Click the bell in the top bar. Every stored item for the lawyer is marked as read, the badge resets to zero, and the app opens
/legal/notifications. - The page is headed "Notifications" with "Track assignment updates, invite actions, and legal workflow alerts."
- Filter with the tabs: All, Assignments, Invites, Messages, Security.
- Each item shows an icon for its type, the title, the body and the time label. Unread items have a green tint.
- Mark all as read appears in the header only while at least one item is unread. It updates local storage; no request is sent.
- Items are not links. To act on one, open Assignments or Invites from the sidebar.
- While the page is open, new items appear at the top as they arrive, and changes made in another tab of the same browser are picked up too.
The Invites tab stays empty
No event is ever given the
invites category, and the API does not send an in-app notification for a partnership invite; it sends an email. New invites are found on the dashboard or the Invites page, not here.Settings
/legal/settings shows the same "Account Settings" screen that agents and landlords use. Nothing is lawyer-specific; the screen only hides the two agent-only sections.
Section (value of ?section=) | Shown to a lawyer |
|---|---|
Profile Information (profile, the default) | yes |
Address Information (address) | yes |
Account Credentials (credentials) | yes |
Notifications Preferences (notifications) | yes |
Security (security) | yes |
Payments & Billing (billing) | yes |
Inspection Availability (availability) | no, agents only |
Inspection Fee (inspection-fee) | no, agents only |
- Open Settings in the sidebar, or Account in the account menu.
- The screen loads the profile once and passes it to whichever section is selected.
- Choosing a section writes
?section=to the URL, so a refresh stays on it. Profile is the default and leaves the URL clean. - An agent-only value typed into the URL (for example
?section=availability) falls back to Profile Information.
Each section's fields, validation and requests are the same as for agents and are described in the dashboard Settings guide. Two points matter for lawyers:
- Profile Information is where the bio lives. Partners see it on the lawyer's profile page, opened from their Legal Partners list.
- Notifications Preferences decides whether the legal review events above are delivered in-app and by email.
States and edge cases
| Situation | What the user sees |
|---|---|
| No stored notifications, or none in the selected tab | A bell icon with "No notifications yet" |
| All items read | The Mark all as read button is hidden |
| Socket not connected (for example after sign-in without a page reload) | No new items arrive until the next full page load |
| Signed in as an agent on the same browser earlier | Their items are stored under a different audience and are not shown to the lawyer |
| Settings profile still loading | Each section shows its own loading state |
What happens next
- A "New Legal Assignment" item means there is a new card on Assignments.
- A "New Documents to Review" item means the lister answered a change request and the assignment is back in review, see Reviewing an assignment.
HomeLink Hub