Commit graph

321 commits

Author SHA1 Message Date
iliya
190cafdb8e feat: implement diff view with 4 phases — review, accept/reject, task scoping, enhanced UX
Phase 1: Core diff extraction and display
- ChangeExtractorService: JSONL streaming parser with snippet extraction
- FileContentResolver: 3-level content resolution (file-history → snippets → disk)
- ReviewApplierService: hunk-level accept/reject with conflict detection
- CodeMirrorDiffView: unified merge view with syntax highlighting
- ReviewFileTree: file browser with status indicators
- changeReviewSlice: Zustand state for review workflow

Phase 2: Interactive review with accept/reject
- Per-hunk and per-file accept/reject decisions
- Conflict checking before apply
- ReviewToolbar with bulk actions
- DiffErrorBoundary for graceful degradation

Phase 3: Per-task change scoping
- TaskBoundaryParser: detects task boundaries in JSONL (Tier 1-4 confidence)
- TaskChangeSetV2 with scope + warnings
- ConfidenceBadge and ScopeWarningBanner components

Phase 4: Enhanced features
- Keyboard navigation (j/k/n/p/a/x shortcuts via useDiffNavigation)
- Viewed file tracking (localStorage + useViewedFiles hook)
- File edit timeline (chronological events per file)
- Git fallback (GitDiffFallback service for incomplete JSONL data)
- Auto-viewed detection (IntersectionObserver sentinel)
2026-02-24 23:39:41 +02:00
iliya
373d1a722b docs: update diff-view iteration plans (phases 2-4)
Update implementation details for accept/reject, per-task scoping,
and enhanced features phases with localStorage error handling and
expanded specifications.
2026-02-24 21:37:36 +02:00
iliya
238a91f5f3 Merge remote-tracking branch 'origin/main' into improvements
# Conflicts:
#	docs/iterations/diff-view/phase-1-read-only-diff.md
#	docs/iterations/diff-view/phase-2-accept-reject.md
#	docs/iterations/diff-view/phase-3-per-task-scoping.md
#	docs/iterations/diff-view/phase-4-enhanced-features.md
#	src/main/ipc/configValidation.ts
#	src/main/services/infrastructure/ConfigManager.ts
#	src/main/services/team/TeamProvisioningService.ts
#	src/renderer/components/chat/items/TeammateMessageItem.tsx
#	src/renderer/components/dashboard/DashboardView.tsx
#	src/renderer/components/settings/hooks/useSettingsConfig.ts
#	src/renderer/components/settings/hooks/useSettingsHandlers.ts
#	src/renderer/components/sidebar/SidebarTaskItem.tsx
#	src/renderer/components/team/TeamDetailView.tsx
#	src/renderer/components/team/activity/ActivityItem.tsx
#	src/renderer/components/team/dialogs/TaskCommentsSection.tsx
#	src/renderer/components/team/members/MemberExecutionLog.tsx
#	src/renderer/utils/taskGrouping.ts
#	src/shared/types/notifications.ts
2026-02-24 21:26:41 +02:00
iliya
545fa2cfb8 feat: enhance diff view and review process with new features
- Updated SnippetDiff to include replaceAll for handling multiple replacements in edits.
- Improved rejectHunks logic to support delete operations and handle replaceAll scenarios.
- Added validation for path traversal in rejectHunks to enhance security.
- Enhanced previewReject to ensure consistency with rejectHunks and prevent conflicts.
- Updated ReviewAPI and IPC handlers to accommodate new features and ensure backward compatibility.
- Improved documentation to reflect changes in diff view and review processes.
2026-02-24 21:18:17 +02:00
Илия
ebc61844e4
Merge pull request #7 from 777genius/sync/upstream-main
merge: sync with upstream/main — session reports, cost calculation, Linux title bar
2026-02-24 21:17:19 +02:00
iliya
06bf5d4381 merge: sync with upstream/main — session reports, cost calculation, Linux title bar, auto-expand AI groups
Brings in upstream changes:
- Session analysis reports (overview, cost, tokens, tools, git, quality)
- Unified cost calculation with LiteLLM pricing data
- Custom title bar for Linux with native toggle
- Auto-expand AI response groups setting
- MoreMenu toolbar component
- Various fixes (window drag, Ctrl+R, notification guard)

All merge conflicts resolved preserving both fork features (team management,
agent language, fullscreen, diff view) and upstream additions.
2026-02-24 21:04:23 +02:00
iliya
61c62741c3 feat: enhance diff view with new features and improvements
- Added 'fallback' confidence level to TaskChangeSet for Phase 3 Tier 4.
- Updated line counting logic in ChangeExtractorService to use `jsdiff.diffLines` for accurate added/removed line counts.
- Introduced new IPC handlers for agent and task changes, improving the review process.
- Enhanced error handling in review handlers with a local wrapReviewHandler function.
- Updated documentation to reflect changes in task scoping and content extraction methods.
- Improved local storage management for viewed files, ensuring compatibility with new formats.
- Added agent block usage policy to TeamProvisioningService for better message formatting control.
2026-02-24 20:56:13 +02:00
iliya
e160626c64 feat: implement diff view functionality with read-only and accept/reject capabilities
- Introduced a comprehensive implementation plan for the diff view feature, structured in four phases: MVP (read-only), accept/reject per hunk, per-task scoping, and enhanced features.
- Phase 1 includes a read-only diff view per agent, utilizing JSONL data to display file changes.
- Defined new types for file changes and review data, and established IPC channels for fetching member changes and reading file content.
- Developed backend services for extracting file changes and aggregating review data, alongside frontend components for displaying diffs and managing state.
- Subsequent phases will enhance the diff view with accept/reject functionality, task-specific change scoping, and improved user experience features.
2026-02-24 20:29:41 +02:00
iliya
2b6f9cf9cd feat: add optimistic role update and IPC handler for member role changes
- Implemented optimistic UI updates in `TeamDetailView` to reflect member role changes immediately.
- Added IPC channel for updating member roles, including validation for team and member names.
- Enhanced tests to cover the new role update functionality, ensuring proper handling of valid and invalid inputs.
2026-02-24 20:29:41 +02:00
iliya
af5f5af18b feat: implement member role update functionality
- Added IPC channel for updating a team member's role, including validation for team and member names.
- Implemented `handleUpdateMemberRole` function to manage role changes and notify the team lead of updates.
- Updated `TeamDataService` to support role changes and ensure data consistency.
- Enhanced UI components to allow role editing and display loading states during updates.
- Integrated role update handling in the team management dialogs, improving user experience.
2026-02-24 20:29:41 +02:00
iliya
70a3d8e34a feat: add agent language update handling and validation
- Introduced support for updating the agent language in the configuration, including a new callback in `initializeConfigHandlers`.
- Enhanced `handleUpdateConfig` to trigger the new language update callback when the agent language changes.
- Updated validation logic to ensure the agent language is a non-empty string.
- Modified the `TeamConfigReader` and `TeamProvisioningService` to handle the new language setting, ensuring teams are notified of language changes.
- Adjusted various components to accommodate the new task start and cancellation features, improving task management in the Kanban board.
2026-02-24 20:29:41 +02:00
iliya
33b41ef5d5 feat: enhance folder navigation and team section UI
- Implemented synthetic group creation for new folders in `DashboardView`, allowing navigation to projects without existing sessions.
- Added `headerExtra` prop to `CollapsibleTeamSection` for inline elements, improving UI flexibility.
- Updated `TeamDetailView` to include a notification button for the `claude-notifications-go` plugin, enhancing user experience with desktop notifications.
2026-02-24 20:29:41 +02:00
iliya
a30f8ab879 fix: enhance message sending reliability and error handling
- Improved the message sending process in `handleSendMessage` by separating try blocks for stdin delivery and persistence, preventing fallback to inbox on stdin success.
- Added logging for persistence failures after stdin delivery to ensure better tracking of issues.
- Updated `TeamSentMessagesStore` to handle IO errors gracefully, preserving optional fields and preventing crashes.
- Enhanced `MessageComposer` to clear draft only after successful message send, improving user experience.
2026-02-24 20:29:41 +02:00
iliya
3a05f113bc feat: enhance notifications and task management features
- Added a section for task completion notifications in the settings, allowing users to receive native OS notifications when tasks are completed.
- Implemented a button to install the `claude-notifications-go` plugin for enhanced notification capabilities.
- Updated the `TeamDetailView` to include a "Mark all as read" feature, improving message management.
- Refactored task creation dialog to support an optional immediate start parameter, enhancing task scheduling flexibility.
- Improved Kanban board functionality by allowing task addition with pre-set start conditions based on the column context.
2026-02-24 20:29:41 +02:00
iliya
63c7204c1a fix: notify team lead when team is renamed 2026-02-24 20:29:41 +02:00
iliya
e090f172ec fix: resolve new member status and notify lead to spawn teammate
- Fix member status resolution: members without messages now show as
  idle/active instead of unknown based on task ownership
- Notify running team lead via stdin when a new member is added so
  the lead can spawn the teammate process
- Map unknown presence label to idle for better UX clarity
2026-02-24 20:29:41 +02:00
iliya
34ef846a5b feat: accumulate and display assistant output during provisioning
- Added `provisioningOutputParts` to `ProvisioningRun` for accumulating assistant text during the provisioning phase.
- Updated `updateProgress` and `emitLogsProgress` functions to include the new `assistantOutput` in the progress state.
- Enhanced `ProvisioningProgressBlock` to display live assistant output using `MarkdownViewer`.
- Modified `TeamProvisioningBanner` to pass the new `assistantOutput` prop for rendering in the UI.
2026-02-24 20:29:41 +02:00
iliya
1aa1410b38 fix: add electron mock to teams IPC test for CI compatibility
The test imports teams.ts which transitively requires electron runtime
(via NotificationManager). Add vi.mock('electron') so tests pass in CI
where electron binary is not installed.
2026-02-24 20:29:41 +02:00
iliya
512237e047 refactor: simplify highlight.js import in ProvisioningProgressBlock
- Updated the import statement for highlight.js to use the main package instead of specific language imports, streamlining the code and reducing dependencies.
2026-02-24 20:29:41 +02:00
iliya
2f75df158c fix: resolve CI failures — add highlight.js dep, remove electron import from provisioning
- Add highlight.js as direct dependency (was transitive via rehype-highlight, missing type declarations in CI)
- Replace `app.getLocale()` with `Intl.DateTimeFormat().resolvedOptions().locale` to avoid importing electron in TeamProvisioningService (broke tests that don't mock electron)
2026-02-24 20:29:41 +02:00
iliya
090c1d47aa fix: improve error handling and logging in message sending process
- Updated error handling in `handleSendMessage` to provide clearer error messages when stdin fails.
- Enhanced JSON highlighting in `highlightLogsHtml` by parsing and pretty-printing JSON strings before highlighting.
- Replaced the paperclip icon with an image plus icon in the `MessageComposer` for better visual representation of attachment options.
2026-02-24 20:29:41 +02:00
iliya
aa49ce0ccc feat: add/remove member, mesage box, improve ui... 2026-02-24 20:29:41 +02:00
iliya
051a727eb2 feat: implement diff view functionality with read-only and accept/reject capabilities
- Introduced a comprehensive implementation plan for the diff view feature, structured in four phases: MVP (read-only), accept/reject per hunk, per-task scoping, and enhanced features.
- Phase 1 includes a read-only diff view per agent, utilizing JSONL data to display file changes.
- Defined new types for file changes and review data, and established IPC channels for fetching member changes and reading file content.
- Developed backend services for extracting file changes and aggregating review data, alongside frontend components for displaying diffs and managing state.
- Subsequent phases will enhance the diff view with accept/reject functionality, task-specific change scoping, and improved user experience features.
2026-02-24 20:25:49 +02:00
matt
c3c4fa65a0
Merge pull request #78 from matt1398/docs/contributing-guidelines
Update CONTRIBUTING.md with new guidelines for PRs and AI-assisted co…
2026-02-24 23:57:50 +08:00
matt
8f85b48863 Update CONTRIBUTING.md with new guidelines for PRs and AI-assisted contributions; remove outdated session analysis report and cost calculation design documents. 2026-02-24 23:57:31 +08:00
iliya
ad1ce7fc2c feat: add optimistic role update and IPC handler for member role changes
- Implemented optimistic UI updates in `TeamDetailView` to reflect member role changes immediately.
- Added IPC channel for updating member roles, including validation for team and member names.
- Enhanced tests to cover the new role update functionality, ensuring proper handling of valid and invalid inputs.
2026-02-24 17:36:12 +02:00
iliya
265becae2d feat: implement member role update functionality
- Added IPC channel for updating a team member's role, including validation for team and member names.
- Implemented `handleUpdateMemberRole` function to manage role changes and notify the team lead of updates.
- Updated `TeamDataService` to support role changes and ensure data consistency.
- Enhanced UI components to allow role editing and display loading states during updates.
- Integrated role update handling in the team management dialogs, improving user experience.
2026-02-24 17:31:26 +02:00
iliya
27eacfa77c feat: add agent language update handling and validation
- Introduced support for updating the agent language in the configuration, including a new callback in `initializeConfigHandlers`.
- Enhanced `handleUpdateConfig` to trigger the new language update callback when the agent language changes.
- Updated validation logic to ensure the agent language is a non-empty string.
- Modified the `TeamConfigReader` and `TeamProvisioningService` to handle the new language setting, ensuring teams are notified of language changes.
- Adjusted various components to accommodate the new task start and cancellation features, improving task management in the Kanban board.
2026-02-24 17:11:54 +02:00
iliya
97f09520f0 feat: enhance folder navigation and team section UI
- Implemented synthetic group creation for new folders in `DashboardView`, allowing navigation to projects without existing sessions.
- Added `headerExtra` prop to `CollapsibleTeamSection` for inline elements, improving UI flexibility.
- Updated `TeamDetailView` to include a notification button for the `claude-notifications-go` plugin, enhancing user experience with desktop notifications.
2026-02-24 16:10:15 +02:00
iliya
47d266b55b fix: enhance message sending reliability and error handling
- Improved the message sending process in `handleSendMessage` by separating try blocks for stdin delivery and persistence, preventing fallback to inbox on stdin success.
- Added logging for persistence failures after stdin delivery to ensure better tracking of issues.
- Updated `TeamSentMessagesStore` to handle IO errors gracefully, preserving optional fields and preventing crashes.
- Enhanced `MessageComposer` to clear draft only after successful message send, improving user experience.
2026-02-24 16:01:44 +02:00
iliya
683146c45d feat: enhance notifications and task management features
- Added a section for task completion notifications in the settings, allowing users to receive native OS notifications when tasks are completed.
- Implemented a button to install the `claude-notifications-go` plugin for enhanced notification capabilities.
- Updated the `TeamDetailView` to include a "Mark all as read" feature, improving message management.
- Refactored task creation dialog to support an optional immediate start parameter, enhancing task scheduling flexibility.
- Improved Kanban board functionality by allowing task addition with pre-set start conditions based on the column context.
2026-02-24 15:38:58 +02:00
iliya
b99fa86e21 fix: notify team lead when team is renamed 2026-02-24 15:07:55 +02:00
iliya
a50cd2a713 fix: resolve new member status and notify lead to spawn teammate
- Fix member status resolution: members without messages now show as
  idle/active instead of unknown based on task ownership
- Notify running team lead via stdin when a new member is added so
  the lead can spawn the teammate process
- Map unknown presence label to idle for better UX clarity
2026-02-24 14:58:23 +02:00
iliya
a212171faa feat: accumulate and display assistant output during provisioning
- Added `provisioningOutputParts` to `ProvisioningRun` for accumulating assistant text during the provisioning phase.
- Updated `updateProgress` and `emitLogsProgress` functions to include the new `assistantOutput` in the progress state.
- Enhanced `ProvisioningProgressBlock` to display live assistant output using `MarkdownViewer`.
- Modified `TeamProvisioningBanner` to pass the new `assistantOutput` prop for rendering in the UI.
2026-02-24 14:32:51 +02:00
iliya
21cebae117 fix: add electron mock to teams IPC test for CI compatibility
The test imports teams.ts which transitively requires electron runtime
(via NotificationManager). Add vi.mock('electron') so tests pass in CI
where electron binary is not installed.
2026-02-24 14:30:17 +02:00
iliya
abaaeea7b8 refactor: simplify highlight.js import in ProvisioningProgressBlock
- Updated the import statement for highlight.js to use the main package instead of specific language imports, streamlining the code and reducing dependencies.
2026-02-24 14:24:33 +02:00
iliya
a3fa65859f fix: resolve CI failures — add highlight.js dep, remove electron import from provisioning
- Add highlight.js as direct dependency (was transitive via rehype-highlight, missing type declarations in CI)
- Replace `app.getLocale()` with `Intl.DateTimeFormat().resolvedOptions().locale` to avoid importing electron in TeamProvisioningService (broke tests that don't mock electron)
2026-02-24 14:23:09 +02:00
iliya
fbcfd7b1a7 fix: improve error handling and logging in message sending process
- Updated error handling in `handleSendMessage` to provide clearer error messages when stdin fails.
- Enhanced JSON highlighting in `highlightLogsHtml` by parsing and pretty-printing JSON strings before highlighting.
- Replaced the paperclip icon with an image plus icon in the `MessageComposer` for better visual representation of attachment options.
2026-02-24 14:17:03 +02:00
iliya
6a31d440a4 feat: add/remove member, mesage box, improve ui... 2026-02-24 14:17:03 +02:00
matt
1233a6f155
Merge pull request #68 from Psypeal/feat/linux-custom-titlebar
feat: custom title bar on Linux with native toggle
2026-02-24 14:23:08 +08:00
Psypeal Gwai
6cc4299245 feat: custom title bar on Linux with native toggle Replace WindowsTitleBar with CustomTitleBar that renders on both Windows and Linux. Add useNativeTitleBar settings toggle with app relaunch to switch between custom and native window frame. 2026-02-23 20:37:42 -08:00
matt
68f16bb717
Merge pull request #73 from holstein13/feat/unify-cost-calculation
Unify cost calculation with shared pricing module
2026-02-24 11:29:50 +08:00
Paul Holstein
56dc860862 feat: show total session cost including subagents in Visible Context panel
Compute subagentCostUsd from sessionDetail.processes[].metrics and
display total cost (parent + subagents) with breakdown in the header.
When subagents exist, shows e.g. "$24.70 ($16.85 parent + $7.84 subagents)"
with a link to the Session Report for full details.

Replaces the "(parent only)" disclaimer since cost is now accurate.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 14:15:25 -05:00
iliya
25b740c134 refactor: unify read state handling in ActivityTimeline and TeamDetailView
- Consolidated the handling of read messages by introducing a `readState` prop in `ActivityTimeline`, which combines `readSet` and `getMessageKey`.
- Updated `TeamDetailView` to pass the new `readState` structure, improving clarity and reducing prop drilling.
- Enhanced unread message logic in `ActivityTimeline` to derive unread status from the new `readState` prop.
2026-02-23 20:06:08 +02:00
iliya
c3e4521cc8 refactor: update IPC channel constants and improve markdown plugin usage
- Replaced local IPC channel constants in `index.ts` with imports from `@preload/constants/ipcChannels` for better consistency.
- Simplified the `leadRelayCapture` assignment in `TeamProvisioningService`.
- Updated markdown plugin imports across multiple components to use the new `REHYPE_PLUGINS` constant.
- Enhanced task status display logic in `TaskRow` for improved clarity.
- Adjusted CSS for better syntax highlighting in the editor.
2026-02-23 20:06:08 +02:00
iliya
361828f21a refactor: clean up GlobalTaskList and enhance TaskDetailDialog
- Removed unnecessary border styling in `GlobalTaskList` for a cleaner layout.
- Added logic in `ActivityTimeline` to identify and set team lead information based on member roles.
- Improved `TaskDetailDialog` to display owner information with enhanced styling and avatar support, utilizing team colors for better visual distinction.
- Streamlined dependency display in `TaskDetailDialog` for improved readability and user interaction.
2026-02-23 20:06:08 +02:00
iliya
1b6f7be767 feat: alot, code highlight, related tasks, group by project and other 2026-02-23 20:06:08 +02:00
Paul Holstein
419913543c fix(review): treat 0 tiered rate as valid, warn on cache-only unknown models
- calculateTieredCost: use `== null` instead of `!` so a 0 tiered rate
  is not treated as missing
- calculateMessageCost: include cacheReadTokens and cacheCreationTokens
  in the unknown-model warning condition

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 12:56:38 -05:00
Paul Holstein
5ca3fc9008 fix(review): address CodeRabbit and Gemini review comments
- Design doc: update "No UI changes" to reflect cost disclaimer
- Plan doc: fix MD001 heading level jump (### after #)
- pricing.ts: rename to PRICING_MAP, add isLiteLLMPricing type guard,
  pre-compute LOWERCASE_KEY_MAP for O(1) case-insensitive lookups
- SessionContextHeader: simplify cost disclaimer JSX into single span
- Tests: fix no-empty-function lint (() => {} → () => undefined)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 12:49:05 -05:00
Paul Holstein
c507a4f9d5 fix: warn on unknown model pricing lookups
Add console.warn when calculateMessageCost encounters an unknown model,
so pricing.json gaps are visible rather than silently returning $0.
Update tests to expect the warning.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 12:34:18 -05:00