Update summary.md and README for sharing/collaboration/backup session
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+42
-1
@@ -12,7 +12,48 @@
|
||||
> Include file-level details in the commit body when the change is non-trivial.
|
||||
|
||||
## Last Updated
|
||||
2026-03-10 — Feature batch: workspace view, graph view, settings tabs, message queue persistence, ToolCallCard direct-API confirm, duplicate detection scoping, push notification fixes.
|
||||
2026-03-11 — Multi-user sharing & collaboration, in-app notifications, groups management, backup rewrite.
|
||||
|
||||
**Multi-user sharing & collaboration:**
|
||||
- `alembic/versions/0025_add_sharing_and_notifications.py` (new): creates `groups`, `group_memberships`, `project_shares`, `note_shares`, `notifications` tables. Partial unique indexes via raw SQL. CHECK constraint enforces exclusive user/group target on share rows.
|
||||
- `src/fabledassistant/models/group.py` (new): `Group` + `GroupMembership` SQLAlchemy models.
|
||||
- `src/fabledassistant/models/share.py` (new): `ProjectShare` + `NoteShare` models with `shared_with_user_id`, `shared_with_group_id`, `permission`, `invited_by` columns.
|
||||
- `src/fabledassistant/models/notification.py` (new): `Notification` model with `type`, `payload` (JSONB), `read_at`.
|
||||
- `src/fabledassistant/models/__init__.py`: exports all three new model groups.
|
||||
- `src/fabledassistant/services/access.py` (new): `PERMISSION_RANK` dict (`viewer=1 editor=2 admin=3 owner=4`). `get_project_permission(uid, project_id)` and `get_note_permission(uid, note_id)` — check ownership, direct share, group-based share, and note→project inheritance; return highest permission string or `None`. Helper predicates: `can_read_*`, `can_write_*`, `can_admin_*`.
|
||||
- `src/fabledassistant/services/groups.py` (new): `create_group`, `list_groups`, `update_group`, `delete_group`, `add_member`, `update_member_role`, `remove_member`.
|
||||
- `src/fabledassistant/routes/groups.py` (new): CRUD at `/api/groups` and `/api/groups/:id`; member management at `/api/groups/:id/members/:uid`.
|
||||
- `src/fabledassistant/services/sharing.py` (new): `share_project/note`, `update_project/note_share`, `remove_project/note_share`, `list_project/note_shares`, `list_shared_with_me`.
|
||||
- `src/fabledassistant/routes/shares.py` (new): project shares at `/api/projects/:id/shares`, note shares at `/api/notes/:id/shares`, `GET /api/shared-with-me`.
|
||||
- `src/fabledassistant/services/notifications.py`: extended with `create_in_app_notification`, `notify_project_shared`, `notify_note_shared`, `notify_group_added`, `list_in_app_notifications`, `unread_notification_count`, `mark_notification_read`, `mark_all_notifications_read`.
|
||||
- `src/fabledassistant/routes/in_app_notifications.py` (new): `GET /api/notifications`, `GET /api/notifications/count`, `POST /api/notifications/:id/read`, `POST /api/notifications/read-all`.
|
||||
- `src/fabledassistant/routes/users.py` (new): `GET /api/users/search?q=` — username/email prefix search, min 2 chars, excludes self.
|
||||
- `src/fabledassistant/services/projects.py`: added `get_project_for_user(accessing_uid, project_id)` → `(Project, perm) | None` and `list_projects_for_user(uid)` (owned + shared).
|
||||
- `src/fabledassistant/services/notes.py`: added `get_note_for_user(accessing_uid, note_id)` → `(Note, perm) | None`.
|
||||
- `src/fabledassistant/routes/projects.py`: `list_projects_route` uses `list_projects_for_user`; `get_project_route` uses `get_project_for_user` and adds `permission` field; `get_project_notes_route` access-checks via `get_project_for_user`.
|
||||
- `src/fabledassistant/routes/notes.py`, `routes/tasks.py`: `get_note_route`/`get_task_route` use `get_note_for_user` and add `permission` field.
|
||||
- `src/fabledassistant/app.py`: registers `groups_bp`, `shares_bp`, `notifications_bp`, `users_bp`.
|
||||
|
||||
**Frontend — sharing & notifications:**
|
||||
- `frontend/src/api/client.ts`: added `ShareEntry`, `GroupEntry`, `GroupMember`, `NotificationEntry`, `UserSearchResult` TypeScript interfaces and API helper functions for all new endpoints.
|
||||
- `frontend/src/stores/notifications.ts` (new): Pinia store — `count`, `items`, `fetchCount`, `fetchAll`, `markRead`, `markAll`.
|
||||
- `frontend/src/components/NotificationBell.vue` (new): bell SVG icon with unread count badge, document-click-outside close, 60s polling interval, toggles `NotificationsPanel`.
|
||||
- `frontend/src/components/NotificationsPanel.vue` (new): absolute-positioned dropdown listing unread notifications by type icon, bold inviter name, relative timestamp. "Mark all read" button. Click navigates to `payload.url`.
|
||||
- `frontend/src/components/ShareDialog.vue` (new): `<Teleport to="body">` modal. Props: `resourceType: 'project' | 'note'`, `resourceId`, `resourceTitle`. User tab: debounced user search dropdown + permission select + Add button. Group tab: group picker + permission select. Current shares list with inline permission change and remove.
|
||||
- `frontend/src/views/SharedWithMeView.vue` (new): `/shared` route. Grid of shared projects (color bar, title, owner, permission badge). List of shared notes/tasks (icon, title, owner, permission badge).
|
||||
- `frontend/src/components/AppHeader.vue`: `NotificationBell` added to `nav-right` before the `?` button; "Shared" nav link added to desktop center nav and mobile menu.
|
||||
- `frontend/src/views/ProjectView.vue`: "Share" button + `showShare` ref + `<ShareDialog>` at template bottom.
|
||||
- `frontend/src/views/NoteViewerView.vue`: "Share" button in toolbar + `<ShareDialog>` after layout root.
|
||||
- `frontend/src/views/TaskViewerView.vue`: "Share" button in toolbar + `<ShareDialog>` after layout root.
|
||||
- `frontend/src/views/SettingsView.vue`: "groups" added to `VALID_TABS`; Groups admin tab added to sidebar. Groups panel: create group form, groups list with member count, per-group "Manage" panel with user search + role select + add, member list with per-member remove.
|
||||
- `frontend/src/router/index.ts`: `/shared` → `SharedWithMeView` route added.
|
||||
|
||||
**Backup rewrite:**
|
||||
- `src/fabledassistant/services/backup.py`: full rewrite to version 2. `export_full_backup()` and `export_user_backup()` now include all tables: projects, milestones, task logs, note drafts (AI draft model), note versions, push subscriptions. `restore_full_backup()` dispatches to `_restore_v1()` or `_restore_v2()` by version key. `_restore_v2()` builds ID maps (`user_id_map`, `project_id_map`, `milestone_id_map`, `note_id_map`); two-pass note restore patches `parent_id` after all notes are inserted.
|
||||
|
||||
---
|
||||
|
||||
**Previous session (2026-03-10):** Feature batch: workspace view, graph view, settings tabs, message queue persistence, ToolCallCard direct-API confirm, duplicate detection scoping, push notification fixes.
|
||||
|
||||
**UI polish pass — design language:**
|
||||
- `frontend/src/assets/theme.css`: added Fraunces Google Font import; `h1/h2/h3` use `font-family: 'Fraunces', Georgia, serif`; `--radius-md` 8→12px, `--radius-lg` 12→18px; added thin indigo-tinted scrollbars (4px); added bubble-specific CSS variables (`--color-bubble-user-*`, `--color-bubble-asst-shadow`); dark palette shifted from generic navy (#1a1a2e family) to slate-indigo (#111113 family).
|
||||
|
||||
Reference in New Issue
Block a user