Skip to content

Fixed Build Pipeline#548

Merged
felix-schultz merged 2 commits intoalphafrom
dev
Apr 2, 2026
Merged

Fixed Build Pipeline#548
felix-schultz merged 2 commits intoalphafrom
dev

Conversation

@felix-schultz
Copy link
Copy Markdown
Member

This pull request introduces several improvements and fixes across the desktop and web applications, focusing on platform-specific dependency management, Windows accessibility integration, web sidebar enhancements, and optimizations for Astro/React component loading. Below are the most significant changes:

Desktop App: Platform-specific Dependency and Windows Accessibility Improvements

  • Refactored rdev and related dependencies in Cargo.toml to be platform-specific, enabling the correct features for Linux (x11, wayland) and updating the windows crate to version 0.61. Also added atspi and zbus dependencies for Linux accessibility support. [1] [2]
  • Updated Windows UI Automation integration to use CoCreateInstance for IUIAutomation creation, switched to using direct property getters (CurrentControlType, CurrentName) for element information, and improved default role assignment in extract_fingerprint_windows_inner. [1] [2] [3]
  • Improved Linux accessibility fingerprinting stub to clarify that full AT-SPI tree traversal is not implemented and to clean up placeholder logic. [1] [2]
  • Scoped usage of xcap::Monitor in screenshot functions to ensure safe usage before any .await, preventing issues with non-Send types in async contexts. [1] [2] [3] [4]
  • Added missing import for windows::core::Interface in Windows WebView tuning logic.

Web App: Sidebar and Bit Management Enhancements

  • Updated the sidebar to add a "Development" section, renamed "Packages" to "Package Registry", and passed development navigation items to the main navigation component. [1] [2] [3] [4]
  • Improved bit management in WebBitState by updating the way bits are added/removed to a user profile, ensuring the correct profile is targeted and avoiding duplicate additions.

Website: Astro/React Integration and Build Optimization

  • Switched all usages of <Header client:load /> and <BlogFooter client:load /> to <Header client:only="react" /> and <BlogFooter client:only="react" /> for more efficient and explicit React component hydration in Astro pages. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]
  • Removed a custom Vite plugin that forced React SSR optimization from the Astro build configuration, simplifying the build process.

… monitor usage

- Scoped Monitor usage in `capture_region` and `capture_full_screen` functions to avoid non-Send issues before awaiting.
- Enhanced error handling and scaling logic for screenshots on HiDPI displays.
- Updated screenshot capture logic to ensure correct cropping based on monitor scale factors.

Update sidebar navigation titles and structure

- Changed "Packages" title to "Package Registry" in the sidebar.
- Added a new development section in the sidebar to include development-related navigation items.

Improve bit state management in profiles

- Modified `addBit` and `removeBit` methods to handle profile IDs and prevent duplicate bit entries.
- Updated API endpoints to reflect changes in bit management.

Add cross-platform cargo check tasks

- Introduced new tasks in `mise.toml` for checking the desktop app on macOS, Linux, and Windows.
- Created a new script `check-desktop.sh` to facilitate cross-platform checks using Docker.

Enhance CSV handling in chart data utilities

- Added `has_csv_table_data` function to check for valid CSV table data structure.
- Updated chart data extraction logic to utilize the new CSV validation function.

Refactor copy-paste command to handle referenced schemas

- Updated `CopyPasteCommand` to manage original references and ensure schemas survive paste operations.
- Implemented cleanup logic for added references during paste operations.

Improve message component layout in chat interface

- Adjusted layout logic in `MessageActions` to account for footer content presence.
- Enhanced conditional rendering for usage statistics in message components.

Add Dockerfile for Linux checks

- Created `check-linux.Dockerfile` to set up a Docker environment for running cargo checks on Linux.
@felix-schultz felix-schultz merged commit 050ad46 into alpha Apr 2, 2026
13 of 16 checks passed
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces significant updates to the desktop application's cross-platform support, including new dependencies and build tools for Linux and Windows. It also refactors fingerprinting logic, updates UI components to use client-only rendering, and improves bit management in the web state. Feedback highlights a regression in the Windows fingerprinting logic where text extraction was lost, and identifies inconsistent ID comparison logic in the bit management functions that could lead to duplicate entries or failed removals.

role: None,
role: Some("Unknown".to_string()),
name: None,
text: None,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The refactoring of the Windows fingerprinting logic has introduced a regression where the text field of the RecordedFingerprint is no longer populated. The previous implementation used UIA_ValueValuePropertyId to extract the content of elements (e.g., text in an input field), which is distinct from the element's Name. This information is crucial for accurate fingerprinting.

const profileId = profile.hub_profile.id;
if (!profileId) return;
const currentBits = profile.hub_profile.bits ?? [];
if (currentBits.some((id) => id.split(":").pop() === bit.id)) return;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The duplicate check logic is inconsistent. It extracts the 'leaf' ID from existing bits using split(':').pop(), but compares it against the full bit.id. If bit.id is a URN (e.g., urn:bit:123), the comparison 123 === urn:bit:123 will always be false, allowing duplicate entries to be added to the profile. Both sides of the comparison should be normalized to the leaf ID.

Suggested change
if (currentBits.some((id) => id.split(":").pop() === bit.id)) return;
if (currentBits.some((id) => id.split(":").pop() === bit.id.split(":").pop())) return;

const profileId = profile.hub_profile.id;
if (!profileId) return;
const currentBits = profile.hub_profile.bits ?? [];
const updatedBits = currentBits.filter((id) => id.split(":").pop() !== bit.id);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Similar to the addBit logic, the filter here assumes bit.id is a raw leaf ID. If bit.id is a full URN, the filter will fail to match and remove the intended bit. Normalizing the input ID ensures the removal logic works regardless of whether a URN or a raw ID is passed.

Suggested change
const updatedBits = currentBits.filter((id) => id.split(":").pop() !== bit.id);
const updatedBits = currentBits.filter((id) => id.split(":").pop() !== bit.id.split(":").pop());

Comment on lines 2 to +11

use flow_like_types::Value;

pub fn has_csv_table_data(value: &Value) -> bool {
match value {
Value::Object(obj) => {
let has_headers = obj
.get("headers")
.and_then(|headers| headers.as_array())
.is_some_and(|headers| !headers.is_empty());
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: The new has_csv_table_data check incorrectly rejects empty tables (e.g., {"headers": [], "rows": []}), causing a fallback to the csv pin which fails if not connected.
Severity: HIGH

Suggested Fix

Modify the logic to gracefully handle an empty but valid table object from the table pin without falling back to the csv pin. This could involve adjusting has_csv_table_data to accept tables with empty headers and rows, or changing the conditional logic in write_csv_to_table.rs to not attempt the fallback if table_value was successfully evaluated, even if it's considered 'empty'.

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/catalog/std/src/a2ui/elements/chart_data_utils.rs#L2-L11

Potential issue: The new `has_csv_table_data` function returns `false` for empty table
objects like `{"headers": [], "rows": []}`, which can be produced by a query with zero
results. In nodes like `write_csv_to_table`, this causes the logic to fall back to
reading from the `csv` input pin. Since the `csv` pin has no default value and may not
be connected when the `table` pin is in use, the `context.evaluate_pin("csv").await?`
call fails, causing a runtime error. This is a regression, as previously working flows
that handled empty query results will now break.

Did we get this right? 👍 / 👎 to inform future reviews.

@codacy-production
Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

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