Skip to content

release/v6.0.0#79

Merged
code-crusher merged 19 commits into
mainfrom
release/v6.0.0
Apr 13, 2026
Merged

release/v6.0.0#79
code-crusher merged 19 commits into
mainfrom
release/v6.0.0

Conversation

@code-crusher

@code-crusher code-crusher commented Apr 13, 2026

Copy link
Copy Markdown
Member
  • feat: add agent file viewer and manager components
  • agent manager toggle animation
  • agent toggle sidebar
  • streamlined chat UI + better agent manager
  • update copy icon
  • better diff view for edit tool
  • fix maximize states
  • cleanup UI
  • feat: Refactor image handling to use ImageAttachment interface and UI improvements
  • feat: Add tooltips for Axon models in ModelSelector
  • feat: Add elapsed time display to exploration groups
  • chore: update CHANGELOG.md for v6.0.0 release
  • fix(ExplorationGroupRow): handle execute_command messages in exploration groups
  • feat: replace add context icon with ImageAdd02Icon and directly open image picker
  • Move code indexing UI from chat view to settings page
  • update pkg version
  • heavy stroke for img icon

matterai-app Bot and others added 17 commits April 9, 2026 18:55
- Add AgentFileViewer, AgentFileViewerContext, AgentManagerView, and AgentPullRequestDiffView components
- Update ChatView, ChatRow, and related components for agent integration
- Add new webview messages and extension messages for agent functionality
- Update custom icons with new agent-related icons
… improvements

This commit introduces significant changes to image handling throughout the
codebase, transitioning from simple string arrays (data URLs) to a structured
ImageAttachment interface that includes both the data URL and filename.

## Image Handling Refactoring

### Core Changes
- Introduced `ImageAttachment` interface in `Thumbnails.tsx` with `dataUrl` and `name` properties
- Added `normalizeImages()` helper to convert legacy `string[]` to `ImageAttachment[]`
- Added `stringsToImageAttachments()` and `extractDataUrls()` helpers in `ExtensionMessage.ts`
  for backend/frontend type conversion
- Updated `imageUtils.ts` `appendImages()` to work with `ImageAttachment[]`
- Modified `process-images.ts` `selectImages()` to return `ImageAttachment[]` with filenames

### Frontend Components Updated
- `Thumbnails.tsx`: Redesigned image display as pill-shaped elements with circular preview,
  truncated filename display, and improved delete button positioning
- `ChatView.tsx`: Lifted `inputValue` and `selectedImages` state for persistence across mode
  switches; updated all image-related handlers to use `ImageAttachment`
- `ChatTextArea.tsx`: Updated drag/drop and paste handlers to create `ImageAttachment` objects
  with proper filenames
- `ChatRow.tsx`: Updated to handle `ImageAttachment[]` with proper normalization

### Backend Integration
- `webviewMessageHandler.ts`: Added type conversions at boundaries using `extractDataUrls()`
  when sending to backend and `stringsToImageAttachments()` when receiving from frontend
- `Task.ts`: Updated to use `stringsToImageAttachments()` when posting messages to webview
- `api.ts`: Updated API methods to use proper type conversions

## UI/UX Improvements

### Image Thumbnails
- New pill-style design with circular image preview (24x24px)
- Filename display with smart truncation (10 chars max before extension)
- Improved hover states and delete button positioning
- Better visual hierarchy with badge styling

### Spacing & Layout
- `ReasoningBlock.tsx`: Added text-sm class for consistent sizing
- `GitHubDiffView.tsx`: Reduced margins (mt-2 -> mt-1) for compact display
- `ExplorationGroupRow.tsx`: Added auto-collapse on exploration completion;
  changed initial expanded state to true
- `ChatRow.tsx`: Added mb-1 margin to message container

### KiloTaskHeader Enhancements
- Added "Move Agent to Background" button with ListVideoIcon
- Added StandardTooltip for both background and close buttons
- Loading spinner shown when no title is present
- Updated default title from "New task" to "New agent..."

## Terminology Updates

Changed "Task" to "Agent" across the UI for consistency:
- `ActionConstants.kt`: NEW_TASK -> "New Agent"
- `package.nls.json`: Command title updated
- `ClineProvider.ts`: Background task label updated
- `i18n/locales/en/chat.json`: Start New Task -> Start New Agent
- `i18n/locales/en/prompts.json`: Prompt descriptions updated
- `ShadowCheckpointService.spec.ts`: Test checkpoint message updated

## New Features

### Plus Button Handler
Added `plusButtonClicked` message handler in `webviewMessageHandler.ts` that:
1. Moves current task to background
2. Refreshes workspace
3. Opens chat view
4. Focuses input field

This allows users to quickly start a new agent while keeping the current
one running in the background.

## Test Updates

Updated all ChatView test files with new required props:
- `inputValue`, `setInputValue`, `selectedImages`, `setSelectedImages`
- Imported `ImageAttachment` type where needed
- Add AXON_MODEL_TOOLTIPS mapping with descriptions for each Axon model tier
- Wrap Axon model options with StandardTooltip showing intelligence/cost info
- Add scrollbar-hide class to model selector dropdown for cleaner UI
- Tooltips display model capabilities and cost tier information
- Add live elapsed time counter during exploration (updates every second)
- Display final elapsed time when exploration completes
- Format duration in Xs/Ym format (e.g., "5s", "1m30s", "2m")
- Show time in both exploring progress and completed summary text
- Calculate time from first message timestamp to last message (completed)
  or current time (in progress)
…ion groups

execute_command uses ask:command not ask:tool, causing it to break out of exploration groups. Add detection for command messages so they are properly grouped and counted.

- Add isCommandAsk() helper for ask:command messages
- Add isCommandOutput() helper for say:command_output messages
- Update isExplorationRelatedMessage() to include commands
- Update isExplorationToolResult() to count completed commands
- Update getToolCounts() to count command messages

Signed-off-by: matterai-app[bot] <matterai-app[bot]@users.noreply.github.com>
…image picker

- Replace FilePlus2 icon with ImageAdd02Icon from customIcons
- Button now directly opens image picker instead of context menu
- Files and folders can still be added via @ symbol
- Remove unused FilePlus2 import from lucide-react
- Remove IndexingStatusBadge from ChatTextArea.tsx
- Add CodeIndexSettings component for settings page
- Add codeIndex section to SettingsView with Database icon
- Add sections.codeIndex translation key to all 22 locale files

This cleans up the chat view while keeping all indexing functionality accessible from Settings → Code Indexing.
@matterai-app

matterai-app Bot commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

Code Quality bug fix type: bug fix

Context

Finalizing the v6.0.0 release which introduces multi-agent workflows and enhanced visual context. This specific update refines the image thumbnail UI to handle edge-case filenames gracefully.

Implementation

Summary By MatterAI MatterAI logo

🔄 What Changed

Refined the truncateFilename utility in Thumbnails.tsx to include a defensive check for filenames without extensions or hidden files (where lastDotIndex <= 0). This ensures that strings are sliced correctly even when a file extension is missing.

🔍 Impact of the Change

Prevents potential UI glitches or logic errors when displaying thumbnails for files with non-standard names (e.g., .gitignore or README). This improves the robustness of the image attachment feature in the v6.0.0 release.

📁 Total Files Changed

Click to Expand
File ChangeLog
Filename Safety Thumbnails.tsx Added defensive logic to handle filenames lacking extensions during truncation.

🧪 Test Added/Recommended

Recommended

  • Unit Tests: Add test cases for truncateFilename with inputs like "file_without_extension", ".hiddenfile", and "" (empty string) to ensure no regressions in string slicing.

🔒 Security Vulnerabilities

N/A - Logic is restricted to client-side string manipulation for display purposes.

Screenshots

before after
N/A N/A

How to Test

  1. Open the webview UI and upload an image with no extension in its name.
  2. Verify the filename is truncated correctly with an ellipsis and does not cause a crash or malformed UI.
  3. Test with a hidden file (starting with a dot) to ensure the same behavior.

Get in Touch

N/A

⏳ Estimated code review effort

LOW (~5 minutes)

Tip

Quality Recommendations

  1. Extract truncateFilename into a separate utility file and add comprehensive unit tests for edge cases like multiple dots, no dots, and very short maxLength values.

♫ Tanka Poem

A dot in the dark, 🌑
Names shortened with careful grace, ✂️
Logic finds its way. 🔍
Hidden files now stand their ground, 🛡️
UI flows in perfect peace. ✨

Sequence Diagram

sequenceDiagram
    participant UI as Thumbnails Component
    participant Util as truncateFilename(name, maxLength)

    UI->>Util: Request truncation for "filename.png"
    Note over Util: Check name.length
    
    alt length <= maxLength
        Util-->>UI: Return original name
    else length > maxLength
        Note over Util: Find lastDotIndex
        alt lastDotIndex <= 0 (No extension or hidden)
            Util-->>UI: Return name.slice(0, max-3) + "..."
        else lastDotIndex > 0
            Util-->>UI: Return truncated name + extension
        end
    end
Loading

@matterai-app matterai-app Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧪 PR Review is completed: Found a couple of issues: a hardcoded fallback string in AgentManagerView and a logic error in filename truncation when the file has no extension.

Skipped files
  • CHANGELOG.md: Skipped file pattern
  • src/package.nls.json: Skipped file pattern
  • webview-ui/src/i18n/locales/ar/settings.json: Skipped file pattern
  • webview-ui/src/i18n/locales/ca/settings.json: Skipped file pattern
  • webview-ui/src/i18n/locales/cs/settings.json: Skipped file pattern
  • webview-ui/src/i18n/locales/de/settings.json: Skipped file pattern
  • webview-ui/src/i18n/locales/en/chat.json: Skipped file pattern
  • webview-ui/src/i18n/locales/en/prompts.json: Skipped file pattern
  • webview-ui/src/i18n/locales/en/settings.json: Skipped file pattern
  • webview-ui/src/i18n/locales/es/settings.json: Skipped file pattern
  • webview-ui/src/i18n/locales/fr/settings.json: Skipped file pattern
  • webview-ui/src/i18n/locales/hi/settings.json: Skipped file pattern
  • webview-ui/src/i18n/locales/id/settings.json: Skipped file pattern
  • webview-ui/src/i18n/locales/it/settings.json: Skipped file pattern
  • webview-ui/src/i18n/locales/ja/settings.json: Skipped file pattern
  • webview-ui/src/i18n/locales/ko/settings.json: Skipped file pattern
  • webview-ui/src/i18n/locales/nl/settings.json: Skipped file pattern
  • webview-ui/src/i18n/locales/pl/settings.json: Skipped file pattern
  • webview-ui/src/i18n/locales/pt-BR/settings.json: Skipped file pattern
  • webview-ui/src/i18n/locales/ru/settings.json: Skipped file pattern
  • webview-ui/src/i18n/locales/th/settings.json: Skipped file pattern
  • webview-ui/src/i18n/locales/tr/settings.json: Skipped file pattern
  • webview-ui/src/i18n/locales/uk/settings.json: Skipped file pattern
  • webview-ui/src/i18n/locales/vi/settings.json: Skipped file pattern
  • webview-ui/src/i18n/locales/zh-CN/settings.json: Skipped file pattern
  • webview-ui/src/i18n/locales/zh-TW/settings.json: Skipped file pattern

Comment thread webview-ui/src/components/agent/AgentManagerView.tsx Outdated
Comment thread webview-ui/src/components/common/Thumbnails.tsx
- Replace hardcoded workspace fallback with generic 'Unknown Workspace'
- Fix truncateFilename logic for files without extensions

@matterai-app matterai-app Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧪 PR Review is completed: The PR successfully addresses previous feedback by fixing the hardcoded workspace fallback and handling filenames without extensions. However, there is a minor edge case with hidden files (e.g., .gitignore) that needs to be addressed.

Comment on lines +21 to +23
if (lastDotIndex === -1) {
return name.slice(0, Math.max(0, maxLength - 3)) + "..."
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 Logic Error

Issue: If a file starts with a dot (e.g., .gitignore, .env), lastIndexOf(".") will return 0. The current logic treats the entire filename as an extension, resulting in ... being prepended to the full filename (e.g., ....gitignore), which exceeds the maxLength.

Fix: Treat files where the dot is at the first character (lastDotIndex === 0) as files without an extension by checking lastDotIndex <= 0.

Impact: Ensures hidden files or files starting with a dot are truncated correctly without exceeding the maximum length.

Suggested change
if (lastDotIndex === -1) {
return name.slice(0, Math.max(0, maxLength - 3)) + "..."
}
if (lastDotIndex <= 0) {
return name.slice(0, Math.max(0, maxLength - 3)) + "..."
}

- Change lastDotIndex === -1 to lastDotIndex <= 0
- Fixes edge case where .gitignore, .env would be truncated incorrectly
@matterai-app

matterai-app Bot commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

✅ Reviewed the changes: The PR successfully implements the fix for handling hidden files (files starting with a dot) during truncation.

@code-crusher code-crusher merged commit a223dab into main Apr 13, 2026
1 check passed
@code-crusher code-crusher deleted the release/v6.0.0 branch April 13, 2026 09:23
@code-crusher code-crusher mentioned this pull request Apr 18, 2026
This was referenced Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant