Commit graph

1519 commits

Author SHA1 Message Date
Mike
05f68ced44 perf(team): enable virtualization past threshold + tests
Final step of the virtualization plan. Turns the virtualized render
path on in production behind a row-count threshold, and adds regression
tests covering every gate.

- `VIRTUALIZATION_ROW_THRESHOLD = 60`. Short lists stay on the direct
  render path (no wrapper, no position: absolute, no measurement
  churn). Above the threshold the virtualizer takes over. Threshold is
  sized so conversations under ~one session of activity don't pay the
  virtualization cost; it activates once scrolling through a longer
  history.
- `shouldVirtualize` now requires `renderRows.length >= threshold` in
  addition to the existing opt-in and scroll-ref checks.
- `MessagesPanel` opts into virtualization for every layout it wires
  (inline / sidebar / bottom-sheet). The internal threshold then
  decides when to actually enable it, so callers don't need per-layout
  heuristics.
- Tests: adds a new `ActivityTimeline virtualization threshold` block
  covering (a) below-threshold list stays on the direct path,
  (b) no viewport → direct path regardless of count, (c) above
  threshold + viewport with `virtualizationEnabled` flips to the
  virtualized render path (simulated by clicking "show all" past
  pagination).

With this in, #70#74 combine to deliver:
- correct IntersectionObserver roots in scroll containers
- atomic render rows with stable keys
- windowed rendering with DOM-measured scrollMargin and measureElement
- auto-on when the cost of direct rendering actually shows up
2026-04-20 00:56:28 +05:00
Mike
b9c2dd5480 perf(team): measureElement + suppress remount animation on virtualized rows
Fifth step of the virtualization plan. Two small, coupled changes that
make the virtualized path stable without a merged-ref helper.

- Attach `rowVirtualizer.measureElement` to the existing virtualizer
  wrapper div. Because the wrapper carries no padding or margin, its
  bounding box matches the inner row, so the observer ref (which stays
  on the inner AnimatedHeightReveal node) and the measure ref (on the
  outer wrapper) address the same effective height. No merged ref
  callback is needed.
- Suppress mount-based entry animation inside the virtualized path.
  The virtualizer mounts and unmounts rows as the user scrolls them in
  and out; without this, the "new item" fade would replay every time
  an older row re-entered the viewport. `renderTimelineRow` now takes
  an optional `suppressEntryAnimation` flag and forwards `isNew=false`
  to both `LeadThoughtsGroupRow` and `MemoizedMessageRowWithObserver`
  when set. The direct render path is unchanged.

Still dormant in this release — `viewport.virtualizationEnabled` stays
false at every call site. PR #6 adds the threshold gate, tests, and
opt-in wiring.
2026-04-20 00:49:48 +05:00
Mike
7c4247bc73 perf(team): virtualizer skeleton + measured scrollMargin (gated)
Fourth step of the virtualization plan. Adds `useVirtualizer` wiring
with a DOM-measured `scrollMargin`, gated behind
`viewport.virtualizationEnabled`. Dormant in this release — no caller
flips the flag yet — so behavior is unchanged.

- Imports `useVirtualizer` from `@tanstack/react-virtual`. Fixed
  per-kind estimates (`ROW_SIZE_ESTIMATES`) drive `estimateSize`. Keys
  come from `row.key`, so row identity matches the renderRows model.
- `shouldVirtualize` requires all of: contract says enabled, a scroll
  element ref is present, and there is at least one row. Otherwise the
  render falls back to the direct `renderRows.map(...)` path from PR
  #72.
- Measures `scrollMargin` via `ResizeObserver` on both the scroll
  element and the timeline root, plus `scroll` and `resize` listeners,
  all rAF-batched. Avoids hand-summed heights that drift when
  composer/status/padding change.
- Virtualized path renders an absolute-positioned list inside a sized
  container (`height = getTotalSize()`). `translateY` subtracts
  `scrollMargin` so rows align to the timeline's own origin rather
  than the scroll container's top.

This PR intentionally does *not* enable `measureElement` (PR #5) or
flip `virtualizationEnabled` for any layout (PR #6) — both rely on
this wiring landing first.
2026-04-20 00:48:23 +05:00
Mike
a43fedcaab refactor(team): flatten ActivityTimeline render into atomic rows
Third step of the virtualization plan. Pure refactor — no UI change, no
virtualization yet. Prepares the timeline for row-level windowing.

- Introduces `TimelineRow`, a discriminated union of `session-separator`,
  `lead-thought-group` (pinned and non-pinned), `compaction-divider`,
  and `message-row`. Each row maps 1:1 to a single visual element.
- Adds a `renderRows` useMemo that walks `timelineItems` once and emits
  atomic rows, hoisting session separators out of the Fragment bundle
  that used to pair them with their owning item. This is the shape a
  windowing layer needs: each row measurable and addressable
  independently.
- Extracts a `renderTimelineRow(row)` helper that switches on `row.kind`
  and returns the same JSX the previous inline render produced. Logic
  per kind is identical — keys, memoization, collapse props, pinned
  thought "live" semantics — so there is no visual diff.
- The render body collapses from two blocks (pinned + `.slice().map()`)
  into a single `renderRows.map(renderTimelineRow)` call.

Follow-ups will virtualize `renderRows` with measured row heights and
tighten observer/animation wiring; pagination, collapse state, zebra
striping, and `groupTimelineItems` are untouched.
2026-04-20 00:47:02 +05:00
777genius
1794e5be4e refactor(runtime): finalize codex native-only config contract 2026-04-19 22:44:48 +03:00
777genius
ee7deb15f7 fix(runtime): remove stale codex phase 4 branches 2026-04-19 22:39:16 +03:00
777genius
cb62acb4fb fix(team): harden restart and session refresh flows 2026-04-19 22:34:43 +03:00
777genius
5d014b375b fix(runtime): tighten codex native-only phase 4 truth 2026-04-19 22:29:26 +03:00
777genius
1f7dd2100f refactor(runtime): remove legacy codex lanes 2026-04-19 22:22:13 +03:00
Mike
d4f518e8c5 refactor(team): viewport contract + observer root for ActivityTimeline
Second step of the virtualization plan. No virtualization yet. This PR
makes IntersectionObserver-based visibility tracking correct inside
scroll containers (sidebar, bottom-sheet), which is a prerequisite for
virtualizing the timeline.

- Introduces `TimelineViewport` — a grouped contract passed as a single
  `viewport` prop on `ActivityTimeline`. Holds `scrollElementRef`,
  `observerRoot`, `scrollMargin`, and `virtualizationEnabled`.
- `MessageRowWithObserver` and `LeadThoughtsGroupRow` now create their
  `IntersectionObserver` with `root = observerRoot?.current ?? null`
  instead of defaulting to the document viewport. Unread marking now
  fires when rows enter their real scroll parent.
- `MessagesPanel` resolves the active scroll owner from `position`
  (inline from parent ref, sidebar from `sidebarScrollRef`, bottom-sheet
  from `bottomSheetScrollRef`) and passes it into ActivityTimeline.
- Tests: stubs `IntersectionObserver` to capture `options.root` and
  asserts null when no viewport is passed, and the provided element when
  `viewport.observerRoot` is set.

`scrollMargin` and `virtualizationEnabled` are included in the contract
but not consumed yet — they land in follow-up PRs (#4/#5).
2026-04-20 00:17:04 +05:00
777genius
4cab3052eb Merge branch 'dev' of https://github.com/777genius/claude_agent_teams_ui into dev 2026-04-19 22:05:40 +03:00
777genius
e9dd7e0920 refactor(team): simplify cache expiration logic in TeamMessageFeedService
- Removed unnecessary line break in cache expiration condition for improved readability.
2026-04-19 22:05:19 +03:00
777genius
41f0b0d1d1 feat(team): enhance TeamMessageFeedService caching and logging
- Introduced caching mechanism with expiration for message feeds to improve performance.
- Added logging for cache expiration events to aid in debugging.
- Updated MessagesPanel to reopen search bar when participant filters are active.
- Added test cases for handling tmux server errors and message panel behavior with filters.
2026-04-19 22:04:44 +03:00
Илия
fd9eb21f55
Merge pull request #70 from sardorb3k/perf/scroll-owner-wiring
refactor(team): wire scroll owners for MessagesPanel layouts
2026-04-19 22:02:11 +03:00
777genius
83748673af fix(team): dedupe project path options 2026-04-19 21:49:40 +03:00
Mike
49e029163b refactor(team): wire scroll owners for MessagesPanel layouts
First step toward virtualizing ActivityTimeline. Makes the real scroll
container observable per layout, without changing behavior.

- `TeamDetailView` forwards `contentRef` to `MessagesPanel` as
  `inlineScrollContainerRef`. `MessagesPanel` accepts it as an optional
  prop (unused in this release) so a follow-up can wire the inline
  viewport to virtualization consumers.
- `MessagesPanel` creates `bottomSheetScrollRef` and passes it to
  `Sheet.Content scrollRef`. react-modal-sheet merges it with its
  internal scroll ref, so the element stays the same DOM node; this
  only exposes it to us.
- Sidebar already owns `sidebarScrollRef`; no change there.

Behavior is unchanged — this only exposes refs for the follow-up that
will thread a viewport contract into ActivityTimeline.
2026-04-19 23:41:33 +05:00
777genius
e90bdc5b7f feat(runtime): switch codex default to native with hidden fallback 2026-04-19 21:21:29 +03:00
777genius
358496c353 merge: integrate task stall monitor shadow rollout into dev 2026-04-19 21:17:25 +03:00
777genius
a8cca65658 feat(team): add task stall monitor shadow rollout 2026-04-19 21:17:09 +03:00
777genius
52677b55d0 feat(team): enhance team messaging functionality and UI
- Integrated pending replies state management for team members.
- Updated TeamDetailView to initialize pending replies from state.
- Added logic to refresh team messages and member activity on tab focus.
- Improved UI components by increasing dialog content width for better layout.
- Enhanced member draft rows with avatar support for better visual representation.
- Implemented reconciliation logic for pending replies based on message history.
- Updated tests to cover new functionality and ensure reliability.
2026-04-19 20:57:13 +03:00
777genius
b5dfa14868 feat(runtime): enable codex-native limited internal unlock 2026-04-19 20:49:29 +03:00
777genius
1d3d7e1f1f fix(team): harden teammate restart lifecycle 2026-04-19 20:17:41 +03:00
777genius
e83e3cbcc9 test(runtime): cover codex-native phase 1 rollout truth 2026-04-19 20:01:45 +03:00
777genius
92a3124e3f fix(runtime): preserve codex-native lane state truth 2026-04-19 19:46:00 +03:00
777genius
30fce3c64d feat(runtime): surface codex-native internal rollout states 2026-04-19 19:41:36 +03:00
777genius
ba37c1caf5 feat(runtime): add codex-native phase 0 app integration 2026-04-19 19:33:37 +03:00
777genius
cd52660f88 feat: switch team member avatars to local assets 2026-04-19 17:33:44 +03:00
777genius
481965f1b4 feat(team): add relaunch flow and stabilize edit member colors 2026-04-19 16:46:56 +03:00
777genius
1e2241aead chore: checkpoint workspace before relaunch flow 2026-04-19 16:08:38 +03:00
777genius
fbf299f276 fix(team): update package manager and enhance member color handling
- Bumped pnpm version to 10.33.0 in package.json.
- Added existing members to EditTeamDialog for better context.
- Improved buildMemberDraftColorMap to reserve colors for existing members and predict colors for new drafts.
- Added tests to ensure color assignment logic works correctly for existing and new members.
2026-04-19 11:56:53 +03:00
Илия
56822467d2
dev -> main Merge pull request #69 from 777genius/dev
dev -> main
2026-04-19 09:18:24 +03:00
Илия
b13ab71857
perf(team): precompute ActivityTimeline session anchors once per render Merge pull request #68 from sardorb3k/perf/activity-timeline-session-precompute
perf(team): precompute ActivityTimeline session anchors once per render
2026-04-19 09:16:09 +03:00
777genius
98657f8b5f fix(team): harden retained log cleanup fallback 2026-04-19 09:00:45 +03:00
777genius
a713d4f058 chore(runtime): bump dev bootstrap to 0.0.3 2026-04-19 08:47:24 +03:00
Илия
2552e87a39
improvement(extesnsions): handle legacy multimodel MCP diagnostics Merge pull request #67 from artemrootman/fix/mcp-diagnostics-runtime-fallback
Merge pull request #67 from artemrootman/fix/mcp-diagnostics-runtime-fallback
2026-04-19 08:17:01 +03:00
Mike
4c359d5185 perf(team): precompute ActivityTimeline session anchors once per render
Replace the per-item backward scan that located the most recent session
anchor with a single forward pass via useMemo.

Before: for every timeline item the render loop walked backward until
it found a lead-thought anchor, so N items produced up to N * N anchor
lookups on every render pass.

After: a single O(n) sweep builds previousSessionAnchorByIndex; render
time lookup is O(1). getItemSessionAnchorId is hoisted to module scope
so it is not recreated per render.

Behavior is unchanged. The three existing separator tests still pass,
and four new cases cover three-session transitions, long runs of
non-anchor items between thought groups, consecutive same-session
thoughts, and single-item lists.
2026-04-19 09:00:59 +05:00
Artem Rootman
2c62909e89
Handle legacy multimodel MCP diagnostics 2026-04-18 23:07:45 +00:00
Илия
1315bdaa54
Update image in README.md
Replaced demo image with a new image in README.
2026-04-19 01:53:22 +03:00
777genius
6ff9a28ccc feat(team): enhance Claude logs handling and improve retrieval logic
- Updated `getClaudeLogs` method to support asynchronous fetching of logs.
- Introduced new interfaces for retained logs and transcript cache entries.
- Added logic to retain and retrieve Claude logs even after cleanup of live runs.
- Implemented fallback mechanism to use persisted transcripts when no live run exists.
- Updated tests to cover new log retention and retrieval scenarios.
2026-04-19 01:38:58 +03:00
777genius
c4dba278b0 test(members): small improvements 2026-04-19 01:38:44 +03:00
Илия
aa37c1e675
Merge pull request #66 from 777genius/dev
dev -> main
2026-04-18 23:17:01 +03:00
Илия
98afde814d
Merge pull request #65 from 777genius/fix/pr64-windows-mcp-cleanup
fix(ci): stabilize windows mcp preflight cleanup
2026-04-18 23:03:17 +03:00
777genius
d766d174e3 fix(ci): stabilize windows mcp preflight cleanup 2026-04-18 22:49:00 +03:00
Илия
d14e06473a
Merge pull request #64 from 777genius/dev
dev -> main
2026-04-18 22:39:49 +03:00
Илия
cd4e9ccba8
refactor(team): split team detail snapshot Merge pull request #58 from 777genius/spike/team-snapshot-split-plan
Merge pull request #58 from 777genius/spike/team-snapshot-split-plan
2026-04-18 22:33:46 +03:00
777genius
61556a5a77 fix(ci): restore checks and lead model selection 2026-04-18 22:28:53 +03:00
777genius
be30101c20 docs(readme): clarify multimodel runtime wording
Refs #63
2026-04-18 22:20:12 +03:00
777genius
93a6ae74b0 refactor(activity): reuse markdown rendering in compact previews 2026-04-18 21:57:59 +03:00
777genius
fd0c936244 fix(ui): finalize team activity and kanban polish 2026-04-18 21:40:47 +03:00
777genius
dac7b4f875 Merge remote-tracking branch 'origin/dev' into spike/team-snapshot-split-plan 2026-04-18 21:08:41 +03:00