[Activity panel 2/3] Add a Mark all as seen action for large backlogs
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- full-stack
Research direction
Start with markTicketSeen and its unseen condition in lib/db/queries/tickets.ts, then markTicketSeenAction in lib/actions/notifications.ts for the access check. The panel is in components/dashboard/activity-panel.tsx, rendered from app/(dashboard)/dashboard/page.tsx. Done means a set-based update limited to the organization and to replies at or before the page load time, with tests for the query, action and confirmation flow. The issue says part 1 (#618) should land first, so check whether that is merged before starting.
Written by the indexing model from the issue text.
Description
Copied from DeadantCo/answerLoops#129 · originally opened by sethr07 on 2026-11-20
Copied from https://github.com/answerLoops/answerLoops/issues/619 — originally opened by
@NathanTarberton 2026-11-17
Series
This is part 2 of 3 of the dashboard Activity panel work. Each part is its own pull request. Build part 1 first, because this adds a control to the panel it redesigns.
- #618: collapse on load, preview 5, and always show the true count
- #619: a "Mark all as seen" action for large backlogs (this issue)
- #620: a channel breakdown, with a channel filter on the tickets page
Summary
Add a Mark all as seen action to the Activity panel, so a team can clear a large backlog of customer replies in one step instead of opening tickets one at a time.
How it works today
- A ticket counts as unseen when it has a customer reply that is newer than its last-seen time, or it has never been seen.
- Opening a ticket (
markTicketSeeninlib/db/queries/tickets.ts) does two things together: it sets the ticket's last-seen time to now, and it marks that ticket's unread notifications as read. - "Seen" is stored on the ticket, so it is shared by the whole team. When one person opens a ticket it is seen for everyone.
- There is no bulk way to do this. With 200 tickets waiting, the only way to clear the panel and the notification badges is to open all 200.
The problem
A backlog that is never cleared makes the Activity count meaningless: people stop trusting it because it never reaches zero, and real new replies hide inside the pile. Teams need a deliberate way to say "I have dealt with all of these, start fresh".
What to build
1. Where it lives
- A secondary Mark all as seen button inside the expanded Activity panel, next to the footer from part 1. It is not in the collapsed header, so it cannot be clicked by accident.
- It is shown only while the panel is shown, which means there is at least one unseen ticket.
2. Confirmation first
- Clicking it opens an inline confirmation, not an immediate action. The text says how many tickets are affected and what it does, for example: "Mark 200 tickets as seen? This clears them for your whole team and removes their unread notifications. Nothing is deleted and the tickets stay open. This cannot be undone."
- Cancel is focused by default and Escape dismisses it. Only an explicit confirm button runs the action.
3. What the action does
- It sets the last-seen time to now for every ticket in the person's organization that is unseen as of the moment the dashboard was loaded, and it marks those tickets' unread notifications as read, matching what opening a ticket does.
- A customer reply that arrives after the page loaded must not be cleared by accident. Pass the page's load time to the action and only touch tickets whose latest customer reply is at or before that time.
- It runs as one set-based update, not a loop over tickets, so it is safe for thousands of tickets and either fully applies or does not apply.
- It is scoped to the person's own organization and never touches another workspace's tickets.
4. What the person sees afterwards
- A confirmation message using the number actually updated, for example "Marked 198 tickets as seen". It can be lower than the number shown, if a teammate opened some in the meantime.
- The Activity panel, the tickets list and the notification badge all refresh. If nothing is left unseen, the panel renders nothing, as it does today.
- If the action fails, the person gets an error message and nothing is changed.
5. Access
- Use the same access check as opening a ticket today (see
markTicketSeenActioninlib/actions/notifications.ts). - In review, confirm whether a bulk action that affects the whole team should be limited to some roles. Do not widen access beyond what opening a ticket needs.
Out of scope
- Undo.
- Marking only a subset, such as one channel or the tickets on screen. That can follow once part 3 exists.
- Any change to what counts as unseen, per-person seen state, or opening the panel automatically.
- Any change to the notification system beyond marking the affected tickets' notifications read.
- An audit log entry for the bulk action.
Where to look
lib/db/queries/tickets.tsformarkTicketSeenand the unseen condition. The new query should reuse the same condition so the two can never disagree.lib/actions/notifications.tsfor the existing server action and its access check.components/dashboard/activity-panel.tsxandapp/(dashboard)/dashboard/page.tsxfor the panel and where it is rendered.
Acceptance criteria
- The button appears only in the expanded panel, and needs an explicit confirmation to run.
- Cancel is focused by default and Escape dismisses the confirmation.
- Every unseen ticket in the organization as of page load is marked seen, and its unread notifications are marked read.
- A customer reply that arrived after the page loaded stays unseen.
- No ticket or notification in another organization changes.
- The person sees the number actually updated, and the panel and notification badge refresh.
- On failure the person sees an error and nothing is partly applied.
Tests
Add tests for the query and action: it updates only unseen tickets up to the load time, leaves later replies alone, marks the matching notifications read, stays inside one organization, and returns the updated count. Add component tests for the confirmation flow, focus, Escape, and the success and error messages.
Start here: new to the project? Read CONTRIBUTING.md first. It covers the ground rules, running answerLoops locally, and how to open a pull request.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DeadantCo/answerLoopsdev
-
Widget: match the chat bubble color to the rest of the widgetPossibly taken @sethr07 claimed this today. Openenhancement frontend help wanted
Difficulty 2/5 Half a day Newbie friendliness 75/100
DeadantCo/answerLoopsdev#68 · 3 comments ·
-
Widget: make the chat window fit on small phonesPossibly taken @sethr07 claimed this today. Openenhancement frontend good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
DeadantCo/answerLoopsdev#67 · 9 comments ·
-
Add 'select all' option to Slack channel picker in SettingsPossibly taken @sethr07 claimed this today. Openfrontend good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DeadantCo/answerLoopsdev#22 · 5 comments ·
-
enhancement frontend help wanted
Difficulty 4/5 3-5 days Newbie friendliness 45/100
DeadantCo/answerLoopsdev#141 ·
-
backend enhancement frontend help wanted
Difficulty 4/5 3-5 days Newbie friendliness 45/100
DeadantCo/answerLoopsdev#140 ·
All issues in DeadantCo/answerLoopsdev
Similar issues
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 92/100
lingdojo/kana-dojo#34545 · 1 comment · 5 reactions ·
Maintainers usually reply within 1 day
-
blocklist addition
Difficulty 1/5 Under an hour Newbie friendliness 82/100
MetaMask/eth-phishing-detect#315455 ·
Maintainers usually reply within 1 day
-
area: telegram bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
griffinwork40/agent-afk#5275 ·
Maintainers usually reply within 1 day
-
macOS: the Save Diagnostics panel goes behind the editor after an app switch and can't be reachedOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
getopenscreen/openscreen#1667 ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
erkamyaman/rust-anything#371 ·
Maintainers usually reply within 1 day