Files
1be6047c8a feat(tracker): field-prefixed search, inline filter chips and zero-hit empty state (#10998)
* feat(tracker): field-prefixed search, inline filter chips and zero-hit empty state

Adds SearchInputAdvanced (field:value prefixes routed to Elasticsearch query_string), match highlighting, inline filter chips with overflow popover, a reusable zero-hit empty state in view-resources, and search-scope/highlight view options for List and Kanban.

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>

* refactor(tracker-search): address review follow-ups on search/filter rework

Shared, non-storage-specific field list, test-folder conventions, locale
coverage, single regex source and an owner-token gate for the result count.

- core: add shared `fullTextSearchFields` constant next to
  FullTextSearchContext as the single source of truth for the full-text
  fields exposed to `field:value` targeting. The client encoder derives
  ES_NATIVE_FIELDS from it and the elastic adapter derives KNOWN_FIELD_RE
  from it, replacing the two "KEEP IN SYNC" copies. Per-field boost weights
  stay a local adapter detail.
- tests: move the five co-located tests into each package's existing test
  folder convention (ui `__test__`, view-resources `__tests__`) and fix the
  relative imports.
- i18n: translate the new tracker search/filter strings in the remaining
  locales (zh, ja, ko, cs, es, fr, it, pt, pt-br, tr), reusing each file's
  existing terminology; ICU placeholders left unchanged.
- encoder: hoist the reserved-character class into one constant and build two
  RegExp instances from it (non-global for `.test()`, global for `.replace()`)
  to avoid the shared-lastIndex trap.
- view-resources: guard `resultIssueCountStore` writes with an owner-token
  gate so a superseded viewlet can no longer clobber the active viewlet's
  count; List/KanbanView claim and release, IssuesView resets through the
  current owner. Assumes a single active IssuesView surface.
- view-resources: make result-count reporting opt-in via a new
  `reportResultCount` prop on List (default true). Embedded, non-primary List
  instances (sub-issues / related issues in the issue edit panel, routed
  through SubIssueList) pass false and never claim the owner token, so opening
  and closing an issue can no longer strand the primary Issues viewlet with a
  dead token — the zero-hit SearchEmptyState card renders again afterwards. Add
  a regression test covering the opted-out embedded consumer.
- elastic: escape every regex metacharacter (not just `.`) when building
  KNOWN_FIELD_RE from `fullTextSearchFields`, so a future field name carrying
  another metacharacter cannot silently corrupt the alternation. Behaviour for
  the current fields is unchanged.

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>

* refactor(tracker-search): centralize regex escaping and lock down result-count store

- Share escapeRegExp from @hcengineering/core so the client encoder and the server elastic adapter escape the fulltext field list identically, not just dots on the client.

- Export resultIssueCountStore as a read-only Readable; the owner-token gate functions (setResultCount / resetResultCount / releaseResultCountOwner) are now the only write path.

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>

---------

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>
Co-authored-by: Michael Uray <michaeluray@users.noreply.github.com>
Co-authored-by: Artyom Savchenko <armisav@gmail.com>
2026-08-11 19:09:33 +07:00
..

Huly Server

GitHub License

Your star shines on us. Star us on GitHub!

About

Huly Server is a collection of server-side packages extracted from the Huly Platform. This repository contains backend infrastructure components, storage adapters, and server-side utilities that power the Huly ecosystem.

These packages provide essential server-side functionality including database adapters (MongoDB, PostgreSQL, Elasticsearch), storage providers (MinIO, S3), messaging infrastructure (Kafka), and collaborative editing capabilities. They are designed to be modular, scalable, and production-ready for building robust backend services.

Packages

This repository includes the following server packages:

Server Core

Database Adapters

Storage Providers

Infrastructure

Pre-requisites

Before proceeding, ensure that your system meets the following requirements:

  • Node.js (v20.11.0 or higher is required)
  • Rush - Microsoft's scalable monorepo manager
  • Docker - For running development services
  • Docker Compose - For orchestrating development environment

Verification

To verify the installation, perform the following checks in your terminal:

  • Ensure that the docker commands are available:
docker --version
docker compose version
  • Verify Node.js version:
node --version

Installation

You need Microsoft's rush to install the application.

  1. Install Rush globally using the command:

    npm install -g @microsoft/rush
    
  2. Navigate to the repository root and run the following commands:

    rush install
    rush build
    

Build

To build all packages:

rush build

To rebuild (ignoring cache):

rush rebuild

Build & Watch

For development purposes, rush build:watch action could be used:

rush build:watch

It includes build and validate phases in watch mode.

Update project structure

If the project's structure is updated, it may be necessary to relink and rebuild the projects:

rush update
rush build

Troubleshooting

If a build fails, but the code is correct, try to delete the build cache and retry:

rm -rf common/temp/build-cache
rush rebuild

Tests

To execute all tests:

rush test

For individual test execution inside a package directory:

rushx test

Running Integration Tests

The repository includes integration tests that require Docker services:

cd tests
./prepare-tests.sh
rush test

Test Coverage

To generate test coverage reports:

# Run tests with coverage
rush test

# Merge coverage reports from all packages
node common/scripts/merge-coverage.js

# Generate HTML coverage report
node common/scripts/generate-coverage-html.js

# View coverage summary
sh common/scripts/show-coverage-summary.sh

The coverage report will be available in coverage/html/index.html.

Package Publishing

To bump a package version:

node ./common/scripts/bump.js -p projectName

Development Environment

Setting Up Services

The repository includes a Docker Compose configuration for development services:

cd tests
docker compose up -d

This will start:

  • MongoDB - Document database
  • PostgreSQL - Relational database
  • Elasticsearch - Search engine
  • MinIO - Object storage
  • Kafka - Message broker

Environment Variables

Create a .env file in the tests directory with the following variables:

MONGO_URL=mongodb://localhost:27017
POSTGRES_URL=postgresql://localhost:5432/huly
ELASTIC_URL=http://localhost:9200
MINIO_ENDPOINT=localhost
MINIO_PORT=9000
KAFKA_BROKERS=localhost:9092

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

Licensed under the EPL-2.0 license.

© 2025 Hardcore Engineering Inc.