paperclip/ui/src/context
Dotta dfcebf082b
[codex] Refresh issue documents from live updates (#6005)
## Thinking Path

> - Paperclip orchestrates AI agents for zero-human companies.
> - The board UI keeps issue pages responsive by subscribing to live
activity events and invalidating TanStack Query caches.
> - Issue documents are first-class issue artifacts, but document
activity events were not refreshing the document list, active document,
or revision caches.
> - That meant a user could update a document on an issue and another
open board would keep showing stale document content until a page
reload.
> - This pull request routes issue document activity events through the
same live invalidation path used for issue and comment updates.
> - The benefit is that issue document changes become visible
automatically on active issue pages without forcing operators to reload
the board.

## What Changed

- Added live-update cache invalidation for `issue.document_created`,
`issue.document_updated`, `issue.document_restored`, and
`issue.document_deleted` activity events.
- Invalidated the issue document list, the active document cache, and
document revisions for both issue id and identifier references when the
activity payload includes a document key.
- Added regression coverage for document activity events so active issue
pages refetch document caches without inactive-only behavior.
- Simplified the document invalidation test mock after Greptile feedback
so the test only models the cache reads it actually uses.

## Verification

- `git rebase public-gh/master` reported the branch was up to date after
fetching `public-gh/master`.
- `pnpm run preflight:workspace-links` passed.
- `pnpm exec vitest run --project @paperclipai/ui
ui/src/context/LiveUpdatesProvider.test.ts` passed: 1 file, 16 tests.
- `pnpm --filter @paperclipai/ui typecheck` passed.
- PR checks passed on `eecd19f7b0355490f17314c94bffa06aada8f9e3`:
`policy`, `verify`, `e2e`, all 4 serialized server shards, `Canary Dry
Run`, `security/snyk`, and `Greptile Review`.
- Greptile completed with `5/5` confidence and no unresolved review
threads.

## Risks

- Low risk. This expands cache invalidation for existing live activity
events and does not change API contracts, database schema, migrations,
or document persistence behavior.
- No migrations or `pnpm-lock.yaml` changes are included.

> For core feature work, check [`ROADMAP.md`](ROADMAP.md) first and
discuss it in `#dev` before opening the PR. Feature PRs that overlap
with planned core work may need to be redirected — check the roadmap
first. See `CONTRIBUTING.md`.

## Model Used

- OpenAI Codex, GPT-5 coding agent, tool-enabled local repository
workflow.

## Checklist

- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] No visible UI layout changed; screenshots are not applicable for
live cache invalidation behavior
- [x] No documentation changes were needed for this internal UI cache
refresh fix
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge

---------

Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-05-15 08:55:54 -05:00
..
BreadcrumbContext.test.tsx Improve operator workflow QoL (#5291) 2026-05-06 06:30:44 -05:00
BreadcrumbContext.tsx Improve operator workflow QoL (#5291) 2026-05-06 06:30:44 -05:00
CompanyContext.test.tsx [codex] Split backend control-plane QoL slice (#4700) 2026-04-28 16:46:45 -05:00
CompanyContext.tsx [codex] Ignore stale stored company selections (#4602) 2026-04-27 13:18:21 -05:00
DialogContext.test.tsx [codex] Split PR #4692 UI/QoL updates (#4701) 2026-04-28 17:18:58 -05:00
DialogContext.tsx Add planning mode for issue work (#5353) 2026-05-06 07:01:28 -05:00
EditorAutocompleteContext.tsx Add skill slash-command autocomplete 2026-04-04 17:48:54 -05:00
GeneralSettingsContext.tsx fix(inbox): address Greptile review findings 2026-04-02 12:16:34 -05:00
LiveUpdatesProvider.test.ts [codex] Refresh issue documents from live updates (#6005) 2026-05-15 08:55:54 -05:00
LiveUpdatesProvider.tsx [codex] Refresh issue documents from live updates (#6005) 2026-05-15 08:55:54 -05:00
PanelContext.tsx Revert "fix(ui): improve routine properties panel and history UX" (#5723) 2026-05-11 13:10:40 -05:00
SidebarContext.tsx feat(ui): active agents panel, sidebar context, and page enhancements 2026-02-20 10:32:32 -06:00
ThemeContext.tsx feat(ui): light/dark theme toggle and light mode color support 2026-02-26 16:33:29 -06:00
ToastContext.test.tsx [codex] Harden execution reliability and heartbeat tooling (#3679) 2026-04-14 13:34:52 -05:00
ToastContext.tsx [codex] Split PR #4692 UI/QoL updates (#4701) 2026-04-28 17:18:58 -05:00