Skip to content

Sync with upstream - #242

Open
ArtyomSavchenko wants to merge 12 commits into
developfrom
sync-with-upstream
Open

ArtyomSavchenko wants to merge 12 commits into
developfrom
sync-with-upstream

Conversation

@ArtyomSavchenko

Copy link
Copy Markdown
Member

No description provided.

MichaelUray and others added 11 commits October 19, 2026 10:45
…1156)

Printing a document (browser print or Save as PDF) also printed the
activity feed and the comment input below the content. Documents are
rendered through the generic Panel from @hcengineering/panel, which
renders the activity without any print styling, unlike controlled
documents, which already mark their activity container as no-print.

Panel gets a printActivity property (default true, so other panels keep
printing their activity as before). When it is false, the activity is
wrapped in a display: contents container with the no-print class, so the
screen layout stays the same and the section is left out of print. The
document editor sets printActivity={false}.

Fixes #9054

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>
Co-authored-by: Michael Uray <michaeluray@users.noreply.github.com>
A query like { dueDate: { $in: [undefined, null] } } produced invalid SQL
on Postgres/CockroachDB: "data#>>'{dueDate}' = ANY(ARRAY[]::jsonb[])", which
fails with "unsupported comparison operator: <string> = ANY <jsonb[]>".
inferType() only looked at the first two array elements, so an array of
null-ish values was typed as jsonb[], and the $in/$nin branches still
emitted an empty ANY/ALL comparison after the null values were filtered out.

inferType() now uses the first non-null element of an array. $in/$nin
treat undefined like null (as the Mongo adapter does): when only null-ish
values are given they translate to plain IS NULL / IS NOT NULL, otherwise
the remaining values are compared and combined with the null check.

Fixes #9697

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>
Co-authored-by: Michael Uray <michaeluray@users.noreply.github.com>
…usage (#11155)

Opening or right-clicking an attribute in class settings checked whether it is in use with client.findOne(attribute.attributeOf, ...). For mixins declared on a class without a domain, such as notification:mixin:Collaborators (a mixin on core.class.Doc), the query throws 'domain not found', so the edit panel and the context menu never opened.

Move the check into an isAttributeUsed helper that skips the query when the attribute class has no domain and treats the attribute as used, since such a mixin can be applied to documents in any domain. This keeps the type locked and shows the stronger delete confirmation. Add unit tests for the helper.

Fixes #7142

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>
Co-authored-by: Michael Uray <michaeluray@users.noreply.github.com>
…11153)

The account_db_v2_social_id_pk_change migration dropped the social_id
primary key and added the new one on _id in two separate ALTER TABLE
statements. CockroachDB v25.1+ commits DDL statements individually
(autocommit_before_ddl), so the drop is rejected with "primary key
dropped without subsequent addition of new primary key in same
transaction" and fresh installs cannot finish the account migrations.

Drop and add the constraint in one ALTER TABLE statement, which both
CockroachDB and PostgreSQL support with the same resulting schema.
Databases that already applied the migration are unaffected because
migrations are tracked by identifier; installs stuck on the failed
migration pick up the new DDL on the next retry.

Fixes #9963

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>
Co-authored-by: Michael Uray <michaeluray@users.noreply.github.com>
…a space (#11154)

In All Issues (and other views without a space or selected project type) the status filter rendered each status presenter with space undefined and no project type. The presenter could therefore not find the project type's per-status configuration and fell back to the status category color, so all statuses of one category looked the same, unlike the issue list.

When no space is known, the filter now resolves a project type per status via a new getStatusProjectType helper: the selected project type if any, otherwise a joined project type that configures a color or icon for the status, otherwise the first joined project type containing it. The result is passed as projectType to the presenter. Views with a space are unchanged.

Fixes #5696

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>
Co-authored-by: Michael Uray <michaeluray@users.noreply.github.com>
…#11130)

Opening a contact channel only worked when the stored value already was an http(s) URL. Phone numbers had no open action at all, and nickname values for GitHub, Twitter or Telegram (which the @Appleseed placeholder asks for) were ignored, so clicking them did nothing.

The OpenChannel action now builds the link from the channel provider via a small helper: tel: for phone numbers, mailto: for e-mail addresses and the profile URL for GitHub, Twitter and Telegram nicknames. Values that are already URLs keep the previous behaviour. The Phone provider gets the OpenChannel action so its value can be opened from the contacts block.

Refs #6404

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>
Co-authored-by: Michael Uray <michaeluray@users.noreply.github.com>
Incoming Google Calendar sync only copied event.location into the Huly event and ignored hangoutLink / conferenceData, so the Meet link of a Google event was lost in Huly.

When a Google event has no location, the video conference link (hangoutLink, or the video entry point of conferenceData) is now stored as the Huly event location, where the location editor already offers a button to open links. An explicit Google location still takes precedence. The mapping is deterministic, so repeated syncs do not duplicate anything.

On the Huly to Google direction the location diff now compares against the same derived value, so pushing an unrelated Huly edit does not copy the Meet link into the Google location field.

Fixes #6848

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>
Co-authored-by: Michael Uray <michaeluray@users.noreply.github.com>
…own (#11144)

The Tracker "New issue" dropdown still offered an "Import" action. The JSON
import handler behind it was removed in #7632, but the menu entry was kept and
its selection fell through to (and later was wired explicitly to) the regular
New Issue dialog, so clicking "Import" just opened an empty issue form.

Import is only supported through the import tool (dev/import-tool), so drop
the misleading entry from the dropdown's actions and visible actions.

Fixes #8491

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>
Co-authored-by: Michael Uray <michaeluray@users.noreply.github.com>
… (#11072)

Pressing C inside a project already opens New issue with that project
preselected, because the keyboard ActionHandler passes the current space
to the action (#4917). Starting the same action from the command palette
(Ctrl/Cmd+K) did not, so the dialog fell back to the last used project.

ShowActions now forwards the current space to ActionsPopup, which hands it
to actions of the active application the same way the keyboard handler
does. The keyboard handler no longer writes the space into the model
action's own props object; both paths use a small helper that copies
the props.

Refs #4547 (the C shortcut itself was fixed by #4917)

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>
Co-authored-by: Michael Uray <michaeluray@users.noreply.github.com>
…1068)

The deadline has a dedicated editor next to the start and due dates, but
the generic attribute list below did not exclude it, so the same field
appeared a second time.

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>
Co-authored-by: Michael Uray <michaeluray@users.noreply.github.com>
Signed-off-by: Artyom Savchenko <armisav@gmail.com>
Comment thread services/calendar/pod-calendar/src/sync.ts Outdated
Comment thread plugins/contact-resources/src/channelUrl.ts
@claude

claude Bot commented Oct 27, 2026

Copy link
Copy Markdown

Review summary

This sync covers a lot of small fixes, and most of them come with focused unit tests, which is good to see.

Checked and look fine:

  • Postgres \$in/\$nin with only null/undefined values, plus the inferType fix.
  • The CockroachDB-safe primary key swap. The migration runner tracks migrations by name only, so editing the SQL of an already-applied migration doesn't re-run it.
  • The withCurrentSpace refactor. It no longer mutates the model's actionProps, which is a real fix.
  • The guard for attributes whose class has no domain.
  • Excluding activity from printing.
  • Removing the dead tracker Import action.
  • Showing status colors per project type in the status filter.

Two inline comments:

  1. Calendar (main concern): writing the Meet link into location means a user can't clear the location in Huly. The next incoming sync puts the link back. A test for that round trip is missing.
  2. Contacts (minor): the e-mail regex accepts ?/&, so a stored channel value can add extra mailto: fields such as bcc or body.

No duplicated resource definitions or missing model migrations found.

- calendar: use the conference link as location only when importing a new
  event, so a location cleared in Huly is not restored by the next incoming
  sync; outgoing diff treats the fallback link / empty location as in sync
- contacts: reject ?, & and # in e-mail channel values to prevent extra
  mailto: fields

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0182yj9emNMY7iBy9KELvPqn
Signed-off-by: Artyom Savchenko <armisav@gmail.com>

@MichaelUray MichaelUray 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.

I reviewed the sync and the follow-up commit e72015e. The port itself looks clean: the 10 commits are the real upstream commits merged in d432c99, and for the 21 files changed on both sides the result matches an automatic 3-way merge (19 exactly; outcomingClient.ts only had an import-order conflict, resolved correctly). The Postgres $in/$nin null handling, the account migration, passing the current space from the command palette, the attribute-usage guard, the status filter colours, the print exclusion and the deadline/Import cleanups all look good, and their new tests call the real helpers. The mailto concern is fixed.

The calendar part of the follow-up still has problems, so I'd suggest fixing these before or right after merge:

  1. Changed or removed conference links stay in Huly and get written back to Google (services/calendar/pod-calendar/src/conference.ts:49-53, sync.ts:490-492). Import an event with Meet link A and no location: Huly stores A as location. If the organizer replaces A with B or removes conferencing, the next incoming sync only reads Google's literal location, so Huly keeps A. The next unrelated edit in Huly then sees location out of sync and writes A into Google's real location field (calendar.ts:371 / outcomingClient.ts:289), so a removed meeting link comes back for all attendees. On the create path (e.g. after a 404 on update) the synthesized link is also written as a real Google location.
  2. Most of upstream #11150 is effectively undone. The link is now only imported when the event is first created in Huly, so events synced before the deploy, and links added to existing Google events, never get it, and the fork diverges from upstream in these files (the next sync will conflict or bring the original behaviour back). One option: keep the conference link separately from the editable location, or import it on update only when the Huly location was never set (undefined, while a cleared location is ''), and send the same fix upstream.
  3. The round-trip test does not run production code (services/calendar/pod-calendar/src/__tests__/conference.test.ts:92-101). It reimplements the incoming step as google.location ?? huly and never calls the outgoing updaters, so reverting the sync.ts fix keeps it green. Tests through the real incoming and outgoing paths for replacement, removal and a later unrelated edit would catch point 1.

Nits:

  • The mailto branch cannot be reached today (Email/Telegram providers have no action), and the regex still accepts ,.
  • tel: links now open in the same window; worth a quick check in the desktop app that this does not navigate the main window.
  • Enabling tests in contact-resources also runs the fork-only person-id-filter.test.ts in CI for the first time.

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