Skip to content

fix(ipc): allow attachment date metadata - #1547

Merged
zerob13 merged 1 commit into
devfrom
fix/ipc-attachment-date-metadata
Apr 27, 2026
Merged

fix(ipc): allow attachment date metadata#1547
zerob13 merged 1 commit into
devfrom
fix/ipc-attachment-date-metadata

Conversation

@yyhhyyyyyy

@yyhhyyyyyy yyhhyyyyyy commented Apr 27, 2026

Copy link
Copy Markdown
Collaborator

fix(ipc): allow attachment date metadata

Summary by CodeRabbit

  • New Features

    • File metadata now supports date values for tracking file creation and modification timestamps.
  • Bug Fixes

    • Improved error propagation in session creation and message sending operations to properly notify callers of failures.
  • Tests

    • Added tests for date-based file metadata handling and error handling in session and messaging workflows.

@coderabbitai

coderabbitai Bot commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

Functions createSession and sendMessage now throw errors after updating state. File metadata schemas expanded to support Date objects. Schema definitions centralized and test coverage added for error handling and date metadata validation.

Changes

Cohort / File(s) Summary
Error Propagation in Session Store
src/renderer/src/stores/ui/session.ts
createSession and sendMessage now throw caught errors after updating error.value, enabling callers to observe failures via exceptions rather than silently returning.
File Metadata Schema Enhancement
src/shared/contracts/common.ts, src/shared/contracts/domainSchemas.ts
New FileMetadataValueSchema allows metadata values to be either JSON types or Date objects. MessageFileSchema.metadata and PreparedMessageFileSchema.metadata updated to use this expanded schema, with the definition centralized in common.ts.
Error Handling Test Coverage
test/renderer/components/NewThreadPage.test.ts
Added tests verifying that rejected sendMessage and createSession calls preserve input state (message, attachedFiles) without clearing them on failure.
Contract Schema Test Coverage
test/main/routes/contracts.test.ts
Added test verifying that session creation and chat message route contract schemas accept attachment metadata containing Date objects for fileCreated and fileModified.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 A rabbit rejoices,
Errors now surface and shout,
Dates bloom in metadata,
Tests catch what might break—
Schemas dance forward, no doubt!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: allowing Date objects in attachment metadata schemas across the codebase.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ipc-attachment-date-metadata

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@zerob13
zerob13 merged commit 50098a3 into dev Apr 27, 2026
2 of 3 checks passed
@zerob13 zerob13 mentioned this pull request Apr 27, 2026
@zhangmo8
zhangmo8 deleted the fix/ipc-attachment-date-metadata branch April 30, 2026 05:55
zerob13 added a commit that referenced this pull request May 1, 2026
* docs: add mac computer use spec

* docs: sync provider tables

* fix: rtk status (#1541)

* fix(rtk): simplify health check

* fix(knowledge): use config ipc

* fix(models): persist db model status

* fix: harden MCP env and knowledge delete

* fix: clean knowledge presenter cleanup paths

* refactor: enhance transition effects and performance across message components (#1542)

- Updated transition classes in MessageActionButtons.vue for smoother animations.
- Refactored MessageBlockContent.vue to optimize artifact snapshot handling with computed properties.
- Improved transition effects in MessageBlockToolCall.vue for better user experience.
- Added a mention icon map in MessageContent.vue to streamline icon retrieval.
- Enhanced MessageItemUser.vue with a new line counting function for better text handling.
- Optimized MessageToolbar.vue for consistent transition effects on button interactions.
- Refactored BrowserPanel.vue to simplify state management for synced bounds.
- Improved ChatSidePanel.vue with better resizing and visibility handling.
- Updated ChatPage.vue to enhance chat search highlight scheduling.
- Cleaned up ChatTabView.vue by removing legacy collapsed new chat button functionality.
- Enhanced tests in ChatTabView.test.ts and WindowSideBar.test.ts for improved coverage and accuracy.

* chore: update markstream-vue to 0.0.13 (#1544)

* fix: preserve interleaved reasoning (#1543)

* chore(release): prepare v1.0.4-beta.2

* fix(ipc): allow attachment date metadata (#1547)

* chore(release): prepare v1.0.4-beta.3

* feat: add mac computer use helper

* feat: enhance computer use guidance

* chore: bump acp registry versions

* fix: import mac signing identity for helper

* build(cua): vendor CUA driver source

* fix(cua): prefer element index click mode

* fix(cua): route zoom clicks by coordinates

* docs(cua): prefer visual fallback for sparse UI

* feat: update vendored cua driver

* fix(computer-use): improve error handling and testability

* docs(cua): add runtime plugin spec

* feat(plugin): add CUA runtime plugin

* feat: migrate computer use to plugin

* fix: surface plugin tools and permissions

* fix(plugin): use MCP-only CUA flow

* ci(plugin): release CUA dcplugin assets

* fix(plugin): hide CUA on unsupported OS

* feat(plugin): bundle official CUA plugin

* fix: harden plugin startup and CUA telemetry

* chore: update CUA driver vendor

* fix(build): sign CUA plugin helper

* fix: improve CUA window scoped vision fallback

* fix(cua): align pixel clicks with upstream

---------

Co-authored-by: yyhhyyyyyy <yyhhyyyyyy8@gmail.com>
Co-authored-by: xiaomo <wegi866@gmail.com>
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.

2 participants