Skip to content

Feature/410 give copilot the same interface as invoke attachments#421

Merged
felix-schultz merged 31 commits intodevfrom
feature/410-give-copilot-the-same-interface-as-invoke-attachments
Dec 8, 2025
Merged

Feature/410 give copilot the same interface as invoke attachments#421
felix-schultz merged 31 commits intodevfrom
feature/410-give-copilot-the-same-interface-as-invoke-attachments

Conversation

@felix-schultz
Copy link
Copy Markdown
Member

This pull request introduces several improvements and new features across the codebase, focusing on enhanced memory management for Rust services, expanded dependency support, and a significant upgrade to the account page UI in the desktop app. The most important changes are grouped below by theme.

Rust Backend: Memory Management & Dependencies

  • Adopted the mimalloc allocator as the global memory allocator for all major Rust backend services (main.rs in aws/api, aws/runtime, aws/runtime-async, and local/api) to improve performance and memory usage. [1] [2] [3] [4]
  • Added new dependencies in Cargo.toml for time zone support (chrono-tz, iana-time-zone), AWS SESv2, and libraries for email, HTTP requests, and memory allocation (lettre, reqwest, mimalloc). [1] [2] [3]
  • Updated workspace dependencies to include mimalloc for relevant backend crates. [1] [2] [3] [4]

Desktop App: Account Page & Subscription UI

  • Refactored the account page to add a new SubscriptionCard component, displaying the user's current subscription tier and providing actions for viewing plans and managing billing. This includes dynamic color coding and conditional rendering based on feature flags and user status. [1] [2]
  • Improved state and effect management in account/page.tsx to use useRef for stable references, centralized profile actions with useMemo, and added feature gating for premium actions. [1] [2] [3] [4]
  • Enhanced imports and UI components to support new features and icons, such as Badge and Crown. [1] [2]

Release & Workflow Updates

  • Updated GitHub workflow and release configuration: release names and bodies are now more consistent and descriptive, and a new "Other Changes" category was added to the changelog for better organization. [1] [2] [3]

Documentation

  • Added Rust-specific contribution guidelines to .github/instructions/rust.instructions.md, clarifying compilation and commenting practices for contributors.

Backend Logic

  • Refactored S3 event handling in file-tracker to clarify key identity parsing and delta calculation for object deletions and updates, improving error handling and code readability. [1] [2]

- Removed the OAuthProvider struct and replaced it with a simpler configuration using provider IDs and scopes.
- Updated Node struct to reference OAuth provider IDs instead of full provider objects.
- Centralized OAuth provider configurations in the Hub struct, allowing for easier management and retrieval.
- Modified related functions to accommodate the new structure, including extraction and merging of OAuth scopes.
- Enhanced the OAuth service to support secret proxy requirements for token exchanges.
- Updated UI components to utilize the new OAuth provider configuration structure.
- Added BatchCreateVersionsNode to facilitate the creation of multiple Jira versions in a single request.
- Introduced BatchVersionInput and BatchVersionResult structs for handling input and output of batch operations.
- Updated existing version handling to improve code readability and maintainability.
- Changed icons for various nodes to use a unified Atlassian or Google icon where applicable.
- Refactored code for better error handling and response parsing in worklog and version management.
- Updated documentation strings for clarity and consistency across nodes.
…and post sharing functionality

- Implemented LinkedIn OAuth provider for authentication and token management.
- Created nodes for retrieving user profile information (`GetMeNode`) and sharing text posts (`ShareTextPostNode`).
- Added support for sharing articles with optional title and description (`ShareArticleNode`).
- Enhanced logging in the UI to format JSON messages for better readability.
- Updated OAuth execution flow to handle token refresh and scope validation.
- Introduced new methods in the OAuth consent store to check for consent with required scopes.
- Improved event handling in the UI components to support new OAuth features.
- Implemented List, Start, and Stop SQL Warehouse nodes in `sql_warehouses.rs`.
- Added functionality to list catalogs, schemas, and tables in Unity Catalog in `unity_catalog.rs`.
- Introduced data structures for SQL warehouses, catalogs, schemas, and tables with parsing logic.
- Enhanced error handling and logging for API requests.
- Registered new nodes with appropriate input and output pins, including OAuth scopes and scoring metrics.
- Extend UserTier struct to include optional product_id.
- Update hub.json schema to include product_id in UserTier properties.
- Introduce SolutionsPage component for managing solution requests.
- Create necessary UI components for displaying, filtering, and editing solutions.
- Implement global permissions for reading and writing solutions.
- Define solution-related types and enums in a new solution schema file.
- Add solution management to the main schema index.
…g status endpoint

- Enhanced the SubmissionResponse struct to include a tracking_token.
- Added a new route for tracking solution status by token.
- Implemented logic to create and store tracking tokens during solution submission.
- Created PublicSolutionStatus and PublicSolutionLog structs for tracking responses.
- Updated the UI to display tracking information and allow copying of tracking URLs.
- Refactored solution details view to include activity logs and payment information.
- Updated solution schema to include trackingToken and logs.
- Improved solution status handling with descriptive labels and statuses.
- Upgraded dependencies: next (16.0.7), react (19.2.1), react-dom (19.2.1).
- Add SendgridMailClient for sending emails via Sendgrid API.
- Add SesMailClient for sending emails using AWS SES.
- Add SmtpMailClient for sending emails via SMTP.
- Create email templates for solution submission confirmation.
- Update solution submission route to send confirmation emails.
- Add pricing and subscription management routes for user.
- Implement pricing retrieval and subscription checkout functionality.
- Enhance user state management with pricing and subscription interfaces.
- Create a subscription management UI component.
- Added a `notify_customer` field to the `AddLogBody` struct to control customer notifications when a solution log is added.
- Implemented email notifications for customers when a solution log is added, including a tracking URL.
- Updated the `update_solution` function to send email notifications when the solution status changes, including the new status and tracking URL.
- Introduced a `HostedProvider` enum to manage different hosted model providers and their configurations.
- Refactored the `fetch_provider` function to support multiple hosted providers and their respective endpoints and API keys.
- Updated the request preparation logic to handle different authentication methods based on the hosted provider.
- Added tests for the new hosted provider functionality and ensured existing functionality remains intact.
- Modified the subscription page to handle billing management for existing subscriptions.
@felix-schultz felix-schultz linked an issue Dec 8, 2025 that may be closed by this pull request
Comment on lines +887 to 897
});

let mut stack_hash = self.stack.hash();
let mut current_stack_len = self.stack.len();
let mut errored = false;
let mut iter = 0;

while current_stack_len > 0 {
self.step(handler.clone()).await;
iter += 1;

if iter % 20 == 0 {
let mut run = self.run.lock().await;
if let Err(err) = run.flush_logs(false).await {
eprintln!("[Error] flushing logs: {:?}", err);
}
}

current_stack_len = self.stack.len();
let new_stack_hash = self.stack.hash();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: AtomicBool uses Relaxed ordering, potentially causing an indefinite hang on weakly-ordered architectures.
Severity: CRITICAL | Confidence: High

🔍 Detailed Analysis

The flush_cancel AtomicBool uses Ordering::Relaxed for both store and load operations. This provides no synchronization guarantees, meaning the background task's loop might never observe the store(true, Ordering::Relaxed) call from the main thread. This can lead to an indefinite hang of the background task, causing the main thread to deadlock when awaiting its completion on line 908, especially on weakly-ordered architectures like ARM.

💡 Suggested Fix

Change flush_cancel.store(true, Ordering::Relaxed) to flush_cancel.store(true, Ordering::Release) on line 907. Change flush_cancel_clone.load(Ordering::Relaxed) to flush_cancel_clone.load(Ordering::Acquire) on lines 874 and 876.

🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: packages/core/src/flow/execution.rs#L852-L897

Potential issue: The `flush_cancel` `AtomicBool` uses `Ordering::Relaxed` for both store
and load operations. This provides no synchronization guarantees, meaning the background
task's loop might never observe the `store(true, Ordering::Relaxed)` call from the main
thread. This can lead to an indefinite hang of the background task, causing the main
thread to deadlock when awaiting its completion on line 908, especially on
weakly-ordered architectures like ARM.

Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 368725

@felix-schultz felix-schultz merged commit 2769ba9 into dev Dec 8, 2025
4 of 11 checks passed
@felix-schultz felix-schultz linked an issue Dec 8, 2025 that may be closed by this pull request
@github-project-automation github-project-automation bot moved this to Done in Flow-Like Dec 8, 2025
@felix-schultz felix-schultz deleted the feature/410-give-copilot-the-same-interface-as-invoke-attachments branch December 8, 2025 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Give Copilot the same Interface as Invoke + Attachments Atlassian Nodes

1 participant