Commit graph

23 commits

Author SHA1 Message Date
Zelen
ca21ab206e
fix(team): render agent error messages
* fix(team): render agent error messages

* test(team): cover agent error activity rendering

* fix(ci): clear ui lint gate

* test(team): reset config cache in relay suites

* test(team): harden mixed lane matrix waits

* test(team): harden ci-sensitive team assertions

---------

Co-authored-by: iliya <iliyazelenkog@gmail.com>
Co-authored-by: 777genius <quantjumppro@gmail.com>
2026-05-01 21:25:03 +03:00
777genius
63bc5ed866 fix(team): stabilize activity timeline virtualization 2026-04-20 08:59:38 +03:00
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
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
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
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
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
cb603aaf37 fix(activity): make new session boundaries exact 2026-04-18 16:58:44 +03:00
777genius
6fbf8518dc feat(member-details): enhance member detail dialog with activity filtering and initial tab state 2026-04-13 17:00:20 +03:00
iliya
21e9fb8c90 feat(team-ui): clarify launch and retry member states 2026-04-09 21:16:24 +03:00
iliya
32ec3a6123 fix(team-data): dedupe passive user reply summaries 2026-04-09 21:15:50 +03:00
iliya
78d4c2826b fix(team): align idle inbox semantics across app 2026-04-08 17:45:09 +03:00
iliya
26f7b9158f fix(graph): enhance particle rendering for task comments
- Added visual differentiation for 'task_comment' particles, adjusting size and glow effects.
- Updated drawing functions to handle new particle kind, ensuring proper rendering in the graph.
- Introduced a merge function for particles to prevent duplicates during state updates.
- Enhanced color constants for better visual representation of different particle types.
2026-03-28 22:55:01 +02:00
iliya
dd42cf0069 fix(team): scan inbox for permission_request during provisioning
relayLeadInboxMessages only processes unread messages after
provisioningComplete, but CLI marks permission_request messages as
read after native delivery -- before our relay runs.

Move permission_request inbox scan BEFORE provisioningComplete check.
Scan ALL messages (including read=true), track processed IDs via
processedPermissionRequestIds Set on ProvisioningRun to prevent
re-emitting. Also look up both alive and provisioning runs so the
scan works during team bootstrap.
2026-03-27 23:35:52 +02:00
iliya
94fc564bf5 feat: UI improvements, bug fixes, and protocol noise filtering
- Fix incorrect error message when attaching files to team lead while team is offline
- Kanban columns: color only on headers, body with 30% alpha tint per user preference
- Worktree projects now correctly detected on Dashboard via path-based detection
- Filter raw protocol messages (idle_notification, teammate-message) from lead thoughts
- Consistent text styles in Attachments section (From original message / From comments)
- Secondary sort for teams by lastActivity timestamp with alphabetical fallback
- Remove colored background from team cards, keep only left border
- Dynamic member color in Add Members dialog based on next available palette color
- Stylized @-mentions in task comments with colored MemberBadge
- Refactor CLI env resolution to shared utility
2026-03-24 17:47:15 +02:00
iliya
cba10b8ad4 feat: enhance team provisioning with member spawn auditing and improved error handling
- Simplified member spawn event handling by removing redundant checks for missing parameters.
- Introduced a new audit function to verify registered members against expected members post-provisioning, flagging any discrepancies.
- Updated logging to provide clearer warnings for unregistered members after provisioning.
- Enhanced test cases to ensure accurate behavior of spawn handling and auditing processes.
2026-03-16 17:20:42 +02:00
iliya
c40c61f099 feat: add cross-team member name extraction and badge component
- Introduced a new utility function to extract member names from cross-team recipient strings.
- Added a CrossTeamTeamBadge component for displaying team names with consistent styling.
- Updated ActivityItem to utilize the new member name extraction and badge component, enhancing the display of cross-team messages.
- Enhanced tests to validate the functionality of the new member name extraction method.
2026-03-10 11:36:48 +02:00
iliya
0feb5e650f feat: enhance cross-team messaging and activity components
- Introduced logic to prevent relaying cross-team replies back into the originating lead, ensuring cleaner message handling.
- Added utility functions for parsing cross-team recipients and determining targets for cross-team messages.
- Updated ActivityItem and TeamProvisioningService to utilize new parsing methods for improved recipient qualification.
- Enhanced tests to validate the handling of cross-team replies and recipient parsing.
2026-03-10 11:26:52 +02:00
iliya
4e82102ceb feat: enhance team member resolution and activity components
- Introduced a new method to avoid duplicate member names in TeamMemberResolver, ensuring case-insensitive uniqueness.
- Updated ActivityItem and ActivityTimeline components to utilize local member names for improved recipient qualification checks.
- Added tests to validate the handling of dotted names and deduplication in cross-team messaging scenarios.
2026-03-10 01:16:01 +02:00
iliya
9adffb2295 feat: enhance task comment notifications and owner wake-up logic
- Introduced a new function to notify task owners on comments from other members, improving communication and responsiveness.
- Updated existing comment handling functions to include logic for notifying owners based on comment type and author.
- Added tests to validate the new notification behavior, ensuring that owners are correctly alerted for relevant comments while avoiding unnecessary notifications for self-comments.
- Refactored task management logic to streamline comment processing and notification handling.
2026-03-09 15:25:22 +02:00
iliya
d486510c9e refactor: update package.json scripts and enhance CI workflow
- Renamed the 'check' script to 'check:workspace' for clarity and updated the main 'check' script to include linting.
- Modified CI workflow to monitor changes in the '.github/workflows/**' and 'pnpm-workspace.yaml' files, ensuring better integration and tracking.
- Added new tests to validate task lifecycle and review processes, enhancing overall test coverage and reliability.
2026-03-07 19:09:58 +02:00
iliya
9bfcbb182c feat: enhance UI and functionality in team dialogs and components
- Improved lightbox toolbar button hit targets for better accessibility.
- Updated ActivityItem and ActivityTimeline components to support managed collapse states for messages.
- Refactored message collapsing logic to allow for user-controlled expansion in various components.
- Enhanced CreateTeamDialog and LaunchTeamDialog with improved loading indicators and layout adjustments.
- Increased maximum message length in SendMessageDialog to accommodate larger inputs.
- Added icons and visual enhancements in ProjectPathSelector and EffortLevelSelector for better user experience.
2026-03-06 23:21:56 +02:00