Commit Graph

199 Commits

Author SHA1 Message Date
Prateek Shourya
7cfb998deb [WEB-4957] improvement: feature flag advanced rich filter operators and minor UI / UX improvements (#4236) 2025-09-18 16:36:41 +05:30
sriram veeraghanta
740a7783c7 Sync: Community Changes #4237 2025-09-17 18:57:11 +05:30
Vamsi Krishna
877c117c37 [WEB-4943]fix: next path url redirection (#7817)
* fix: next path url redirection

* fix: enhance URL redirection safety in authentication views

Updated SignInAuthSpaceEndpoint, GitHubCallbackSpaceEndpoint, GitLabCallbackSpaceEndpoint, and GoogleCallbackSpaceEndpoint to include checks for allowed hosts and schemes before redirecting. This improves the security of URL redirection by ensuring only valid URLs are used.

* chore: updated uitl to handle double /

---------

Co-authored-by: pablohashescobar <nikhilschacko@gmail.com>
Co-authored-by: Nikhil <118773738+pablohashescobar@users.noreply.github.com>
2025-09-17 18:52:35 +05:30
Prateek Shourya
e02fa2449c [WEB-4830] feat: add work item rich filters (#3747)
* feat: rich filters store architecture and UI components

* feat: add work item layout filter HOC

* improvements: minor enhancements for rich filters
* added button configuration to add filters button
* added option to disable transition for filter item
* fixed filter item label truncation
* added support for changing work item filter config keys

* improvements: add filter button config initialization

* improvements: work item layout filter compatibility fixes

* refactor: update filter structure and improve type safety across automation and rich filters

- Changed filter property types to use TFilterProperty and TFilterValue for better type consistency.
- Updated various components and hooks to utilize new type definitions, enhancing type safety.
- Refactored filter configuration and adapter logic to accommodate the new types, ensuring compatibility with existing functionality.
- Improved handling of filter expressions and conditions, streamlining the overall filter management process.

* chore: restructure rich filter utils

* refactor: optimize filter value handling and update automation condition types

- Removed unnecessary condition checks in automation details sidebar trigger.
- Enhanced filter value input to handle empty states more gracefully.
- Updated filter helper methods to return both optimal operator and transformed value.
- Adjusted filter instance logic to accommodate changes in operator and value updates.
- Modified type definitions for automation conditions and filter configurations to support SingleOrArray types.
- Added utility functions for transforming values based on operator requirements.

* fix: handle single-value operators in automation condition filters

* fix: build errors

* chore: refactor work item filters to core with enterprise extensibility

* chore: update clear filters logic from project work item empty state

* chore: remove header filters selection from project work item list

* chore: remove header filters selection from project work item list mobile header

* feat: add work item filters bar to support save and update views

* feat: add visibility button to filters bar

* chore: minor fixes for work item filters adapter

* feat: enhance filters bar with async save and update handling

* chore: minor ux fixes for filters bar

* refactor: split updateCondition into separate operator and value update methods

* feat: add save and update view options to rich filter instance

* chore: minor fixes in clear filters

* feat: project level work item filters hoc with save and update view options

* chore: minor UX improvements for view save and update options

* chore: ordering fix in work item filters store

* improvement: enhance work item filters with consistent naming and memoization optimization

* feat: different variants for filters row

* feat: implement rich filters in create and update project view modal

* chore: ensure that max visible conditions are only visible in header variant

* feat: add tracker elements for clear filter, save view, and update view

* feat: update layout filter if view is updated from modal

* feat: implement rich filters for project archived work items

* feat: implement rich filters for cycle work items

* feat: implement rich filters for module work items

* chore: remove module applied filters header

* feat: implement rich filters in epics layout

* feat: implement rich filters in workspace views

* chore: remove router filter params from all issue layout root

* feat: implement rich filters for profile work items

* fix: shouldNotifyChangeForExpression should be called before clearing the filter expression

* refactor: get all the entities from props to generate work item config

* feat: implement rich filters for teamspace work items

* feat: implement rich filters for teamspace views

* feat: implement rich filters for teamspace project work items

* feat: implement rich filters for teamspace views create / update modal

* chore: remove all instances of FilterSelection component

* chore: clean up filters from FilterSelection

* feat: add LegacyToRichFiltersConverter and BaseIssueFilterSet for enhanced filtering capabilities

- Introduced LegacyToRichFiltersConverter to automate conversion from legacy filter formats to rich filter JSON structure, including validation features for UUIDs, choices, and dates.
- Added BaseIssueFilterSet with custom filter methods for handling soft delete exclusions and direct field lookups for the Issue model.
- Updated README.md to document the new converter and filter set usage, including examples and configuration options.

* feat: implement migrations for rich filters in core and EE models

- Added migration scripts to convert legacy filters to rich_filters format for core models (IssueView, WorkspaceUserProperties, etc.) and EE models (EpicUserProperties, InitiativeUserProperty, TeamspaceUserProperty).
- Introduced utility functions for migrating and clearing rich_filters, enhancing the migration process.
- Updated date validation in the LegacyToRichFiltersConverter to utilize dateutil.parser for improved flexibility in date format handling.
- Enhanced README.md to reflect changes in date validation capabilities.

* fix: build errors

* feat: refactor rich filter config and utils to support complex and extended filters

* feat: add `state_group` to project level filters

* chore: minor updates for work item filter configs

* feat: add state group set filter

* feat: add project and teamspace project filters

* chore: remove filters-selection component

* Updated IssueViewset to use complexfilter backend and made improvements to grouping.

- Refactored IssueListEndpoint and IssueViewSet to utilize new filtering and grouping features, enhancing query efficiency.
- Updated issue grouping functions to accept a queryset parameter, improving flexibility and performance.
- Optimized AND operations through branch-based evaluation.

* Changed the rich filters query param to 'filters'

* chore: integrate project work item rich filters with backend

* refactor: page wise filter constants

* chore: minor build fixes

* feat: integrate rich filters across all work item layouts

* fix: view update on additional changes

* chore: enabled filter item transition

* chore: remove total filters from view list item

* feat: add work item subscriber filter

* added custom UUIDInFilter and update filterset to utilize it

* fix: handle empty filters with empty object instead of null

* Fixed bug with updating issues

* fix: disable save view in epic layout

* chore: update state group set filter label

* fix: filter item early return re-render error

* fix: space app build

* fix: web build

* added CharInFilter and enhanced BaseFilterSet to support exact filters

* add subscriber ID filters to BaseIssueFilterSet

* simplify filter definitions in BaseIssueFilterSet by removing unnecessary lookup expressions

* Use comma separated values for in and range filters

* Fixed issue creation

* fix: reset filter condition when operator changes to different config type

* fix: only show work item type filter if enabled for project

* chore: minor fix in cleanup function and sub work item types

* fixed date rage filter

* fix: initial work item filters for global view, project view, teamspace view, initial work item filters for static views

* fix: add condition with negation operator

* fix: reset filters when project and teamspace view layouts unmount

* Enhance issue filtering capabilities across multiple views by integrating ComplexFilterBackend and BaseIssueFilterSet. Refactor issue querysets to apply filtering and annotations consistently, improving performance and maintainability.

* chore: update epic filters to show by layout

* Enhance issue queryset by applying annotations for improved data handling in WorkspaceViewIssuesViewSet.

* Fixed workspace issue viewset

* feat: add rich_filters support to multiple user properties endpoints

* fix: incorrect count

* improvement: update filters dropdowns height to full

* refactor: update filter label from "Grouping" to "Work item group" for clarity

* improvement: update work item filters list order

* feat: sanitize and stabilize filter expressions before external conversion

* chore: reorder add filter button in filters row

* feat: enhance issue viewsets by adding prefetch_related for improved performance and data retrieval across multiple endpoints. Refactor queryset handling to streamline filtering and annotations.

* feat: apply static view filters to workspace issues

* chore: minor updates for global view rich filters

* fix: local storage filters

* refactor: update issue filter handling to use new supported filter types

- Replaced instances of EIssueFilterType with TSupportedFilterTypeForUpdate in various components and stores.
- Updated filter update methods to utilize the new filter type structure for better consistency and maintainability.
- Removed deprecated filter handling logic across multiple files, streamlining the filter update process.

* feat: enable rich filters for cycle and module analytics progress stats

Refactored progress statistics components to support advanced filtering capabilities across cycles and modules. Added new shared components for assignee, label, and state group progress tracking with consistent filtering interface.

* refactor: update sub-issue filter components to use available filters

- Replaced layoutDisplayFiltersOptions with availableFilters in SubIssueFilters and related components for better filter management.
- Introduced new constants for available filters specific to work item and initiatives pages.
- Cleaned up unused imports and improved filter enabling logic for clarity and maintainability.

* chore: disable operator selection when filter is disabled or only one operator option is available

* refactor: enhance filter components to support disabled state

* chore: minor cleanup

* reorderd the data migration for rich filters

* refactor: rich filter utils structure

* refactor: reuse traversal and transformation utilities

* refactor: use type guards in rich filters

* cleanup: remove unused comment

* refactor: restructure filter system with extended rich filters support

- Rename and reorganize filter modules for better structure
  - complex_filter.py → filter_backend.py
  - migration_utils.py → filter_migrations.py
  - Remove custom_filters.py (inlined into filterset.py)

- Create extended filter system with inheritance hierarchy
  - Add extended/ directory with enhanced converters and filtersets
  - Support additional enterprise fields (team_project_id, type_id)
  - Maintain base functionality while adding extended features

- Centralize imports through clean public API
  - Update all view imports to use plane.utils.filters module
  - Extended classes automatically override base implementations
  - Maintain backward compatibility

- Rename BaseIssueFilterSet to IssueFilterSet across codebase
- Update migration files to use new converter structure
- Consolidate filter utilities for better maintainability

* Added missing param

* refactor: restructure rich filters by removing obsolete operator files and introducing core and extended operator configurations

* refactor: restructure rich filters utils

- Streamlined exports in rich-filters index files for factories, operations, types, and validators.
- Removed obsolete core types and operators, integrating their functionalities into a more cohesive structure.
- Introduced new factory and operation files to enhance modularity and maintainability.
- Improved type guards and utility functions for better type safety and clarity in filter operations.

* refactor: enhance operator handling in rich filters

- Introduced `getOperatorForPayload` utility to streamline operator normalization and negation handling across filter components.
- Updated various filter-related files to utilize the new utility, improving code clarity and reducing redundancy.
- Refactored condition addition logic to leverage the new operator handling, ensuring consistent behavior in filter expressions.

* Updated migration sequence

* refactor: update filter constants and types for consistency

- Renamed filter-related constants from `FILTER_TYPE_OPTIONS` to `FILTER_FIELD_TYPE_OPTIONS` for clarity.
- Updated references in various components and stores to use the new naming convention.
- Introduced new field type configurations to enhance filter handling and maintainability across the application.

* feat: enhance shared-state and rich filters integration

- Added new filter components and utilities to the shared-state package, improving the filter expression handling.
- Introduced `AddFilterButton`, `FilterItem`, and various input components for rich filters, enhancing user interaction.
- Updated existing components to utilize the new shared-state functionalities, ensuring consistency across the application.
- Refactored filter-related logic to streamline the integration of work item filters and improve maintainability.

* refactor: use factory functions instead of shared-state adapter

* fix: update filter helpers to handle negation correctly

* chore: minor comment cleanup

* feat: introduce new filter configurations and utilities for work item filters

- Added various filter configurations including cycle, date, label, module, priority, project, state, teamspace, user, and work item type.
- Implemented helper functions for multi-select and single-select configurations to streamline filter creation.
- Enhanced existing filter utilities to support new configurations, improving the overall filter management system.
- Organized filter-related code into dedicated files for better maintainability and clarity.

* feat: add rich filters types

* feat: add rich filters constants

* feat: add rich filters utils

* feat: add rich filters store in shared state package

* feat: add rich filters UI components

* chore: minor updates and fixes.

* chore: update pnpm lock file.

* [WEB-4842] feat: enhance rich filters with complex filter support and improved code organization

* chore: remove state group set from state filter

* chore: remove state group set from work item rich filters

* replace DashboardWidgetIssueFilterSet with IssueFilterSet in WidgetListEndpoint

- Removed the custom DashboardWidgetIssueFilterSet class and replaced it with the existing IssueFilterSet.
- This change simplifies the filter logic for the WidgetListEndpoint, leveraging the existing functionality of IssueFilterSet.

* removed state_group_set filter and related logic from IssueFilterSet

* fix: make setLoading optional in loadOptions function for improved flexibility

* fix: automation condition item value display

* chore: minor cleanup and updates

* chore: revert un-needed changes

* chore: remove duplicate exports

* chore: minor improvements to rich filters

* chore: minor improvements

* code cleanup and minor fixes

* chore: minor change

---------

Co-authored-by: JayashTripathy <jayashtripathy371@gmail.com>
Co-authored-by: Dheeraj Kumar Ketireddy <dheeru0198@gmail.com>
Co-authored-by: pablohashescobar <nikhilschacko@gmail.com>
Co-authored-by: sangeethailango <sangeethailango21@gmail.com>
2025-09-16 21:28:20 +05:30
sriramveeraghanta
89b9dd7969 fix: merge conflicts 2025-09-16 21:26:28 +05:30
Prateek Shourya
d521eab22f [WEB-4885] feat: new filters architecture and UI components (#7802)
* feat: add rich filters types

* feat: add rich filters constants

* feat: add rich filters utils

* feat: add rich filters store in shared state package

* feat: add rich filters UI components

* fix: make setLoading optional in loadOptions function for improved flexibility

* chore: minor improvements to rich filters

* fix: formatting
2025-09-16 21:15:08 +05:30
Prateek Shourya
08446b79cf [WEB-4842] feat: enhance rich filters with complex filter support and improved code organization (#4210)
* feat: add rich filters types

* feat: add rich filters constants

* feat: add rich filters utils

* feat: add rich filters store in shared state package

* feat: add rich filters UI components

* chore: update pnpm lock file.

* [WEB-4842] feat: enhance rich filters with complex filter support and improved code organization

* chore: remove state group set from state filter

* fix: make setLoading optional in loadOptions function for improved flexibility

* fix: automation condition item value display

* chore: remove duplicate exports

* chore: minor improvements to rich filters

---------

Co-authored-by: sriramveeraghanta <veeraghanta.sriram@gmail.com>
2025-09-16 20:37:39 +05:30
sriram veeraghanta
1aed863d61 fix: merge conflicts 2025-09-10 02:07:42 +05:30
Vamsi Krishna
260d9a053d [WEB-4802] fix: module sort order (#7674)
* fix: module sort order

* chore: removed secondary sort for progress

* chore: sort refactor
2025-09-09 23:49:30 +05:30
Aaryan Khandelwal
bef9737e40 fix: merge conflicts resolved from preview 2025-09-09 20:09:50 +05:30
M. Palanikannan
99bc4262c5 [WIKI-654] fix: version history to load from html (#7754)
* fix: versions history to load from html

* chore: added json and stripped to store in version history (#7755)

---------

Co-authored-by: Bavisetti Narayan <72156168+NarayanBavisetti@users.noreply.github.com>
2025-09-09 19:26:19 +05:30
sriram veeraghanta
39dc4ca55c fix: eslint warning limit (#4133)
* fix: eslint changes

* chore: format files
2025-09-05 20:15:20 +05:30
sriram veeraghanta
4d79b27a67 [WEB-4804] chore: fix all file formatting and eslint errors (#4123)
* chore: fix all file formating

* fix: eslint errors
2025-09-04 16:48:18 +05:30
Anmol Singh Bhatia
7d7e37439d [WEB-4840] chore: icon migration from @plane/ui to @plane/propel/icons (#7721)
* chore: move icons from ui package to propel package

* chore: package and tsdown config updated

* chore: migrate all icon imports from @plane/ui to @plane/propel/icons

* chore: remove icon components from @plane/ui package (migrated to
  @plane/propel/icons)

* chore: code refactoring

* chore: migrate remaining icon components from @Plane/ui to @Plane/propel/icons

* fix: lint error

* chore: code refactor
2025-09-04 14:44:53 +05:30
Prateek Shourya
e76f9af1c1 [WEB-4848] fix: add safe index access in templates components and utils (#4111) 2025-09-03 20:43:55 +05:30
sriramveeraghanta
eba4a144b8 fix: merge conflicts 2025-09-03 14:18:49 +05:30
sriram veeraghanta
b99ddc24e7 [WEB-4810] feat: migrate to tsdown from tsup (#7679)
* feat: migrat to tsdown to tsup

* fix: build scripts

* fix: lock file fixes

* fix: adding build process to i18n and propel packages

* fix: lint warning

* chore: update services module entry points

* fix: lock file

* fix: lock file

* fix: remove tsc from build

* fix: tsdown configs

* fix: remove tsc step from build process

---------

Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
Co-authored-by: Aaron Reisman <aaron.reisman@plane.so>
2025-09-03 14:01:57 +05:30
sriramveeraghanta
c14ca5a98a fix: merge conflicts 2025-09-02 21:11:18 +05:30
sriram veeraghanta
4b74751e4e [WEB-4837] feat: adding more packages to catalog (#7693)
* feat: adding more packages to catalog

* fix: lock file

* fix: sharp pacakge catalog
2025-09-02 21:03:03 +05:30
Jayash Tripathy
9fbb1a42d0 [WEB-4125] [WEB-4824] feat: dashboard widget rich filters (#3881)
* feat: rich filters store architecture and UI components

* improvements: minor enhancements for rich filters
* added button configuration to add filters button
* added option to disable transition for filter item
* fixed filter item label truncation
* added support for changing work item filter config keys

* improvements: add filter button config initialization

* feat: done basic  setup of rich filters in dashboard widgets

* refactor: clean up whitespace in widget type definitions

* feat: implement complex filtering backend for Django REST Framework

* Added ComplexFilterBackend to support advanced JSON-based filtering with logical operators.
* Introduced DashboardWidgetIssueFilterSet for filtering issues based on various criteria.
* Updated widget views to utilize the new filtering capabilities.
* Refactored widget_graph_plot.py to streamline query construction.
* Added README documentation for the filters module detailing usage and examples.

* chore: update filter configurations and clean up

* Enhance ComplexFilterBackend for improved performance and documentation

* Updated WidgetListEndpoint to pass the view instance to the filter method.
* Optimized NOT operations to use subqueries instead of large IN clauses for better performance.
* Removed deprecated range filter validation logic.
* Expanded README documentation to include performance considerations and advanced usage examples for NOT operations.

* Refactor DashboardWidgetIssueFilterSet to use custom filter methods for soft delete exclusion

* Replaced direct field lookups with custom filter methods for assignee, cycle, module, mention, and label IDs to exclude soft deleted records.
* Added new filter methods for label ID and label ID in to enhance filtering capabilities.
* Improved code readability and maintainability by centralizing filtering logic.

* refactor: remove unused export for TAutomationConditionFilterExpression in widget.ts

* fix: types

* chore: added more filters

* refactor: made the TFilterValue typed and add config for boolean

* refactor: made TFilterValue typed and add config for boolean

* Refactor WidgetListEndpoint to streamline issue filtering logic

* Updated the issue filtering process to first retrieve workspace by slug, improving clarity and maintainability.
* Consolidated filtering conditions into a single query for better performance and readability.
* Enhanced the DashboardWidgetIssueFilterSet to utilize the new filtering capabilities for label IDs.

* Enhance ComplexFilterBackend with depth validation and structure checks

* Introduced maximum depth validation for complex filters to prevent excessive nesting.
* Added structure validation to ensure proper JSON format for filter nodes.
* Implemented detailed error handling for various filter scenarios, improving robustness and user feedback.

* Refactor WidgetListEndpoint to improve workspace and dashboard retrieval

* Updated the WidgetListEndpoint to retrieve the workspace by slug before querying the dashboard, enhancing clarity and maintainability.
* Replaced multiple filter conditions with workspace ID for dashboard and widget queries, improving performance and consistency.
* Removed redundant workspace retrieval from the end of the method to streamline the code.

* chore: remove boolean filter value input

* improvements: define value type for filter configs

* chore: add default value type for filter configs

* chore: minor type updates for filter configs

* imrovement: type safety of the operators in rich filters

* refactor: reverted to old types of rich filters

* refactor: reverted to old label of rich filters

* refactor: enhance dashboard widget filters with new adapter and HOC

- Replaced the existing WidgetConfigSidebarFilters with EnhancedWidgetConfigSidebarFilters to support new filter logic.
- Introduced DashboardWidgetFilterAdapter for converting between internal and external filter expressions.
- Updated filter configurations to use the new external filter structure.
- Removed the old filters adapter and adjusted related types for better clarity and maintainability.
- Cleaned up imports and improved code organization in the filters components.

* chore: cleanup

* chore: cleanup

* refactor: update dashboard filters and add observable for filters

* refactor: comment out draft filter configuration in dashboard filters

* ♻️  refactor:  adaptor to have comma separated array values and removed draft filter config

* ♻️ refactor: updated the default value for the empty expression

* ♻️ refactor: value sanitization for empty values

*  feat: enhance sidebar filters with loading state and optimized data fetching

* 🧹 chore: remove duplicate export of work-item-filters from utils index

* 🎨 style: update button variant in sidebar filters from neutral-primary to accent-primary

* 🔧 fix: update dependency in withFilters to include handleSubmit in effect dependencies

* 🔧 fix: update _parseFilterValue to handle SingleOrArray type for filter values

* Removed unnecessary code

* ♻️ refactor: integrate workspace project fetching and improve dashboard filter handling

* 🔧 fix: rename EXTERNAL_OPERATOR_SEPARATOR to EXTERNAL_WIDGET_OPERATOR_SEPARATOR for consistency in filter handling

---------

Co-authored-by: Prateek Shourya <prateekshourya29@gmail.com>
Co-authored-by: Dheeraj Kumar Ketireddy <dheeru0198@gmail.com>
2025-09-02 12:37:15 +05:30
Aaryan Khandelwal
f451a7c2d9 fix: merge conflicts resolved from preview 2025-09-01 22:53:30 +05:30
M. Palanikannan
fd5ba6c7b8 [WIKI-511] [WIKI-572] fix: extended page root and editor body (#7661)
* fix: better refactoring of page root and editor body

* fix: editor sideeffects

* fix: add comments json field

* fix: props name

* fix: review changes

* fix: extra checks

* fix: type changes

* fix: remove editor ref current

* fix: renaming

* fix: link check
2025-09-01 22:17:53 +05:30
Bavisetti Narayan
9e11dc9cdc [WIKI-511] feat: inline page comments (#3599)
* feat: page comments

* chore: added node id

* chore: changed reverse relation

* chore: added resolve comment endpoint

* fix: build errors

* fix: basic comment decoration added

* fix: add marks

* fix: operations

* fix: to ditch decorations approach!

* fix: move dev-wiki into apps

* fix: new approach with some more types

* fix: link view container

* fix: editor ee packages updated

* fix: basic threads implementation added

* fix: comments scroll and filtering

* fix scrolling

* chore: added total count for comments

* fix: seperate the comments store

* fix: comments removal

* feat: multi comment on same mark

* fix: mark fixed and styles of comments fixed!

* feat: added better animations

* fix: better styles and animations for comments

* fix: ee seperation

* fix: threads api fix

* fix: new comment store attached

* fix: resolve and delete

* fix: remove framer motion

* fix: add comment ordering

* fix: delete extension

* fix: web

* fix: context aware comments

* fix: new working comment store

* fix: getting changes to web

* fix: ui of comments

* fix: comment mark resolution fixed

* fix: move changes to store

* temp fix: project pages

* fix: comments using lite text editor

* fix: rerendering infinitely

* fix: comment box and reference

* chore: updated the migration file

* fix: move things to ee

* chore: un commented the feature flag logic

* chore: removed an extra line in feature flag

* fix: editor types

* fix: scrolling of thread items

* fix: scrolling of thread items

* fix: type errors

* fix: comment creation

* fix: page comments

* fix: page comments

* fix: remove utils

* fix: added feature flagging

* fix:loading json content

* fix: upload items

* fix: upload items

* fix: ui chanegs

* fix: comment box

* fix: better spacing

* Fix spacing and removing the divs not needed anymore

* fix: comments storing json

* Add comment thread management hooks

* Replace use-new-comment hook with use-scroll-manager

Remove useNewComment hook and related logic. Add useScrollManager hook
for managing scroll behavior in the comments sidebar. Refactor
threads-sidebar to use scroll manager for thread and comment box
navigation. Add cancel button to new comment box.

* Remove hover and click effects for resolved comment marks

* Auto-scroll new comments in sidebar after order sync

Adds highlight and scroll-to behavior for newly created comments.
Sidebar now scrolls to the new thread after comments order updates.

* Add granular page comment permissions and UI checks

Introduce canCurrentUserCommentOnPage permission for pages. Update
comment UI to respect user comment permissions. Refactor comment
creation logic into useNewComment hook. Hide comment/reply UI for users
without permission.

* Refactor comments components and imports for clarity and type safety

* Refactor comments components to use local types and remove unused files

- Move type definitions from shared types file into local components -
Remove unused comment-reactions component and types/index.ts - Update
imports to use local hooks and types - Minor code cleanup and formatting

* Refactor comments feature flag and clean up comments components

- Replace isPageCommentsEnabled with isCommentsEnabled in page stores -
Remove unused types, utils, and reactions components from comments -
Move and rename comments components for consistency - Update editor
flagging to use new comments feature flag logic - Simplify comments
sidebar and thread item structure - Remove redundant exports and props
from comments modules

* Refactor comments extension to use workspace feature flag

- Pass storeType to navigation pane extensions - Check isCommentsEnabled
with workspaceSlug before rendering comments - Update canComment logic
to use canCurrentUserCommentOnPage - Remove console.log and unused code
- Fix types for extension props

* Add canCurrentUserCommentOnPage to TeamspacePage

* Refactor TCommentConfig type and move EditorSideEffects

- Move TCommentConfig to ce/types/editor.ts and ee

* fix: ce sync

* fix: prosemirror-model fixed

* chore: removed the extra migration

* chore: added page comments serializer

* fix: comments

* refactor: comments

* fix: ce/ee seperation

* chore: changed the page serialization

* fix: page comments refactored

* fix: remove ce changes

* fix: restoration for nested pages fixed

* fix: less ce changes

* fix: imports

* fix: better refactoring of page root and editor body

* fix: renaming files

* fix: editor sideeffects

* fix: add comments json field

* fix: page comments types

* fix: lint warnings

* fix: props name change

* fix: props name

* fix: comment mark

* fix: import type

* fix: review changes

* fix: extra checks

* fix: type changes

* fix: remove editor ref current

* fix: renaming

* fix: renaming files

* fix: comments extension revamp

* fix: declaring better types

* fix: better types

* fix: hooks seperated

* fix: edit box

* fix: html validation

* fix: agents md

* fix: naming convention

* fix: update names and service methods

* fix: more fixes

* fix: attributs

* fix: dev wiki sync

---------

Co-authored-by: Palanikannan M <akashmalinimurugu@gmail.com>
Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
2025-09-01 20:56:52 +05:30
Jayash Tripathy
f2edf637de [WEB-4809] chore: added common libs to pnpm workspace catalog (#7611)
* chore: added common libs to pnpm workspace catalog

* chore: update pnpm lockfile to use exact versions for React and TypeScript dependencies

* refactor: removed string from the versions

* fix: lint

* refactor: cleanup

* fix: lint

* chore: updated lock file
2025-09-01 19:42:56 +05:30
sriramveeraghanta
34181fba80 chore: version bump 2025-09-01 19:38:21 +05:30
sriram veeraghanta
e849cd45dd Sync: Community Changes #4057 2025-09-01 13:53:21 +05:30
Anmol Singh Bhatia
16d531cc7a [WEB-4808] fix: joinUrlPath utility fn #7678 2025-09-01 13:51:26 +05:30
sriramveeraghanta
b70629c98e fix: merge conflicts 2025-08-29 14:37:08 +05:30
Surya Prashanth
258d24bf06 [SILO-454] chore: refactor decorator, logger packages (#7618)
* [SILO-454] chore: refactor decorator, logger packages

- add registerControllers function abstracting both rest, ws controllers
- update logger to a simple json based logger

* fix: logger instance and middleware

* fix: type and module resolutions

* fix: lodash type package update

* fix: bypass lint errors in decorators

* chore: format changes

---------

Co-authored-by: sriramveeraghanta <veeraghanta.sriram@gmail.com>
2025-08-29 14:29:16 +05:30
sriram veeraghanta
fe9aa38453 Merge branch 'preview' into sync/ce-ee 2025-08-28 18:52:31 +05:30
Prateek Shourya
e0912ccefc [WEB-4040] fix: minor changes in base plan names (#7656) 2025-08-28 18:51:10 +05:30
sriram veeraghanta
1d72bf7e2a fix: merge conflicts 2025-08-27 21:13:16 +05:30
sriram veeraghanta
0e6fbaee3a [WEB-4790] fix: moved typescript parser to the base eslint config (#7658)
* fix: moved typescript parser to the base eslint config

* fix: eslint warning

* fix: type config setting

* fix: convert live eslint to cjs
2025-08-27 21:03:20 +05:30
Prateek Shourya
ca59bc23aa [WEB-4765] improvement: update filter structure and improve type safety for rich filters (#3942)
* refactor: update filter structure and improve type safety across automation and rich filters

- Changed filter property types to use TFilterProperty and TFilterValue for better type consistency.
- Updated various components and hooks to utilize new type definitions, enhancing type safety.
- Refactored filter configuration and adapter logic to accommodate the new types, ensuring compatibility with existing functionality.
- Improved handling of filter expressions and conditions, streamlining the overall filter management process.

* chore: restructure rich filter utils

* refactor: optimize filter value handling and update automation condition types

- Removed unnecessary condition checks in automation details sidebar trigger.
- Enhanced filter value input to handle empty states more gracefully.
- Updated filter helper methods to return both optimal operator and transformed value.
- Adjusted filter instance logic to accommodate changes in operator and value updates.
- Modified type definitions for automation conditions and filter configurations to support SingleOrArray types.
- Added utility functions for transforming values based on operator requirements.

* fix: handle single-value operators in automation condition filters
2025-08-27 21:01:47 +05:30
Vipin Chaudhary
0fe7da6265 [WIKI-345] chore: pass disabled and flagged extensions to block menu (#7152)
* chore: refactor editor

* sync changes

* feat: api service update

* refactor : update sync

* fix : package sync

* fix: requested changes

* fix : embedhandler type

* fix : remove commands

* refactor : space

* refactor : rich lite editors

* refactor : minor ce changes

* chore : minor ui fix

* package: tldjs

* refactor : remove tldjs

* refactor: flagged

* refactor: flagged

* chore : remove disbaled check in menu

* refactor: fix space

* refactor: NodeViewProps

* refactor: type

* refactor : update community types

* refactor : remove external embed CE

* remove : external embed config from ce

* refactor : update disabled

* chore: pass disabled

* chore : update utils
2025-08-26 02:23:50 +05:30
pushya22
b6e6dd180c Sync: Community Changes #3986 2025-08-25 13:41:28 +05:30
Jayash Tripathy
9a77e383cd [WEB-4751] chore: enhance URL utility functions with IP address validation and cleaned up url extraction (#7636)
* feat: enhance URL utility functions with IP address validation and cleaned up the extraction utilities

* fix: remove unnecessary type assertion in isLocalhost function
2025-08-25 13:38:09 +05:30
Vipin Chaudhary
870ad552e3 [WIKI-345] feat: editor external embeds (#2924)
* refactor: iframe service

* refactor: name iframely

* refactor: use extension storage

* refactor:error handler

* refactor : error handling

* fix: drag handler inside error

* feat: refactor space embed handler

* refactor: handle convert UI

* refactor : iframely service , controller

* refactor: fix modal opening logic

* feat: loading in twit embed.

* fix: twit frame

* feat :tweet fix in space.

* refactor: change name casing

* feat: add icon link

* feat: added animation

* fix : iframe styles

* refactor : update link-container

* refactor : fix build

* feat: handle link url mark

* fix: iframely service created in web

* fix: group issue

* fix: use live URL instead

* fix : close embed modal

* feat: handle arrow keys

* fix: handle error

* fix : remove logs

* feat: handle bookmark

* feat: handle og image

* chore:remove observer

* feat: handle bookmark and embed

* feat: handle custom render

* chore: clean up

* feat: handle conversion

* fix : handle links properly

* feat: handle figma embed

* refactor : put iframely controller in ee

* refactor: better icon

* feat: feature flag external embed

* feat: timeout

* feat: refactor embed component

* refactor: upgrade plan

* feat :handle block menu

* feat: handle comment

* fix : reloads

* refactor : remove border

* fix : embed order

* fix :Embed handler

* feat: insert embed v1

* feat : web bookmark command

* chore: fix text

* feat: ui updates

* feat: handle cursor focus

* feat: update isopened in storage

* feat: add platform name

* fix:deny plane embed

* feat: props update

* feat: handle embed options properly

* chore: minor changes

* chore : add external embeds in the page form

* chore : convert bookmark to rich card

* feat : update thumnail not found

* feat: add new loading animation

* fix : handle paste embed

* feat:block translation

* feat: basic local setup

* feat: embed translation for all languages

* chore : update feature flag name

* feat: handle feature flag in space

* FIX: add build in i18n package

* fix : update props for embed handler

* chore : remove comments

* chore : move hooks

* FIX : package update

* FIX: live

* feat: handle unique ID

* feat: handle thumbnails

* chore : remove useless fetch

* chore : update types

* refactor : twitter theme

* chore : remove slash command for rich card

* chore: different text in readonly

* refactor : change editor name

* refactor: update modal style

* refactor : make the html simple

* refactor : external extension

* refactor : rename extension

* refactor: attribute names

* refactor : add entity type

* refactor: figma hook

* refactor: remove translations

* fix : creds

* feat: handle iframely api auth

* feat: handle space embed load

* feat: handle paste link

* feat: styles updates

* chore : remove editable condition

* remove link-container

* feat : feature flag slash command

* chore

* fix

* chore : refactor external embed

* refactor : fix embed insert

* chore : remove auth

* chore : remove old code

* fix : build

* fix:auth

* Fix: floating portal Fix

* fix: refactor

* fix : update types

* fix: build

* fix : update iframe response types

* refactor: embed ui components

* refactor : emebd components

* refactor : add tailwind animations

* refactor core

* refactor ce

* refactor : move icons

* refactor lite editor

* small refactor

* refactor : update icons import

* build fix

* fix: cors

* feat: update project structure

* refactor : embed handler

* refactor : embed hooks

* refactor : packages

* chore: embed setup in dev wiki

* refactor: embed extension

* refactor:fix types

* refactor: external emebds

* chore: clean imports

* chore :remove readonly editor types

* chore : remove logs

* Revert changes to dev-wiki/

* refactor: remove upgrade plane component

* feat: add unique id

* refactor : update fetching logic with useSWR

* Feat: Handle auth in iframley API

* feat:update embed select style

* refactor : remove useless component

* refactor : widge embed

* Remove changes to i18n locales path

* refactor: utils

* refactor : update emebd handler

* wip --

* fix : build

* refactor : block menu

* refactor:remove unused code

* refactor : update block menu

* refactor: slash command feature flag

* refactor: add badge in slash command

* refactor: editor attribute

* refactor : embed handler

* fix : swr

* fix : build

* refactor: feature flag space

* refactor : storage types

* refactor: remove embeddable

* refactor: space remove feature flag

* refactor: update space feature flag

* refactor: external embed

* fix :rerender

* build : fix hooks

* fix: block menu refactor

* refactor: hooks

* refactor: move tldjs

* refactor :extension

* refactor: page render

* refactor : update NodeViewProps types

* refactor : embed handler space

* refactor: update has_embed_failed

* refactor: remove useless render code

* refactor : twitter embed

* fix : build

* refactor : attribute with commands

* refactor : external embed extension.

* refactor: external embed storage.

* fix : rich and embed types

* fix : web embed

* style : selection

* refactor: space embed handler

* fix : extension storage

* refactor: embed types

* refactor: imports

* fix : page renderer

* chore: add comment

* chore: update comments

* chore: install tldjs

* refactor: update ui package

* fix :dev-wiki pnpm changes

* chore: minor improvements

* refactor : update embed  type

* refactor : update component name

* refactor :url modifier

* refactor: remove external embed ce

* feat: disabled external embed

* refactor: add disabled props

* refactor:  remove get attribute method

* refactor: package ui styles

* feat: translations

* refactor: theme type

* feat: jwt auth

* improve: add jwt auth for user

* chore :comment translations

* refactor: api params

* refactor: update types

* refactor: update props

* refactor: constants

* refactor: lite comments

* refactor: add type imports

* refactor:external embed node view

* refactor: move tldjs to dev dep

* refactor: add flagged check

* refactor: update slice imports

* refactor: update type changes

* chore : remove comments

* refactor : update nodeview types

* chore :remove type export

* chore: update icon

* chore: update iframley types

* fix: build errors

---------

Co-authored-by: Palanikannan M <akashmalinimurugu@gmail.com>
Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
2025-08-25 02:30:03 +05:30
sriram veeraghanta
f78bcb1b00 fix: merge conflicts 2025-08-24 15:26:50 +05:30
Jayash Tripathy
841388e437 [WEB-4751] refactor: added tld validation for urls (#7622)
* refactor: added tld validation for urls

* refactor: improve TLD validation and update parameter naming in URL utility functions

* refactor: enhance URL component extraction and validation logic

* fix: lint

* chore: remove unused lodash filter import in existing issues list modal

---------

Co-authored-by: Sriram Veeraghanta <veeraghanta.sriram@gmail.com>
2025-08-23 01:07:35 +05:30
sriramveeraghanta
1c33578441 fix: merge conflicts 2025-08-19 20:31:24 +05:30
Jayash Tripathy
cd61e8dd44 [WEB-4705] chore: url utilities (#7589)
* feat: add truncated link export and URL utility to respective modules

* refactor: replace Link2 with ExternalLink in TruncatedUrl component

* feat: add TruncatedUrl component and update link exports

* fix: export ParsedURL interface for better accessibility in URL utilities

* refactor: remove TruncatedUrl component and update link exports

* fix: update parseURL function to return undefined for invalid URLs

* refactor: rename ParsedURL interface to IParsedURL for consistency

* refactor: rename IParsedURL to IURLComponents and update parsing functions for improved clarity

* refactor: update URL utility functions and improve documentation for clarity

* refactor: add full URL property to IURLComponents interface and update extractURLComponents function

* refactor: rename createURL function to isUrlValid and update its implementation to validate URL strings

* refactor: rename isUrlValid function to getValidURL and update its implementation to return URL object or undefined
2025-08-19 20:09:03 +05:30
Aaron
553f01fde1 feat: migrate to pnpm from yarn (#7593)
* chore(repo): migrate to pnpm

* chore(repo): cleanup pnpm integration with turbo

* chore(repo): run lint

* chore(repo): cleanup tsconfigs

* chore: align TypeScript to 5.8.3 across monorepo; update pnpm override and catalog; pnpm install to update lockfile

* chore(repo): revert logger.ts changes

* fix: type errors

* fix: build errors

* fix: pnpm home setup in dockerfiles

---------

Co-authored-by: sriramveeraghanta <veeraghanta.sriram@gmail.com>
Co-authored-by: Prateek Shourya <prateekshourya29@gmail.com>
2025-08-19 20:06:42 +05:30
Jayash Tripathy
d8f246168e [WEB-4704] refactor: made TFilterValue typed (#3899)
* refactor: made TFilterValue typed and add config for boolean

* chore: remove boolean filter value input

* improvements: define value type for filter configs

* chore: add default value type for filter configs

* chore: minor type updates for filter configs

---------

Co-authored-by: Prateek Shourya <prateekshourya29@gmail.com>
2025-08-19 18:53:36 +05:30
Sriram Veeraghanta
eebd2b9404 fix: merge conflicts 2025-08-19 00:35:12 +05:30
Aaron Heckmann
d8f58d28ed fix: CI to include lint and format along with build (#7482)
* fix(lint): get ci passing again

* chore(ci): run lint before build

* chore(ci): exclude web app from build check for now

The web app takes too long and causes CI to timeout. Once we
improve we will reintroduce.

* fix: formating of files

* fix: adding format to ci

---------

Co-authored-by: sriramveeraghanta <veeraghanta.sriram@gmail.com>
2025-08-18 21:27:16 +05:30
Prateek Shourya
b85609fb18 [WEB-4680] Improvement: automations UX improvements for creating nodes. (#3914)
* improvement: remove duplicate automation details fetching logic from layout

* improvement: update the trigger and condition node creation and update logic

* chore: update trigger select component

* improvement: enhance action create / update flow

* improvement: allow specifying position for adding automation IDs in project automation store

* chore: comment out scope loader component in automation details

* feat: add empty state for custom automations
2025-08-18 18:27:58 +05:30
Prateek Shourya
3e633d0d12 [WEB-4679] chore: automation improvements and bug fixes (#3907) 2025-08-14 14:51:31 +05:30
Prateek Shourya
a84d0025a2 [WEB-3815] feat: project automations (#3802)
* init: automations store and components

* chore: updated components

* refactor: correct semantics

* chore: modal components added

* chore: update conjunction translations

* Pgtrigger and Outbox prototype

* feat: add event stream app with models and migrations

- Introduced the event_stream app with initial models: Outbox and IssueProxy.
- Implemented a PostgreSQL trigger for logging updates to issues.
- Added necessary migrations and updated settings to include the new app.

* refactor: migrate event publisher to event stream

- Updated imports in test files to reflect the new event_stream app structure.
- Removed the event_publisher app, including its models, migrations, and tests.
- Introduced MemorySafeOutboxEventListener and related service for handling outbox events.
- Added management command for starting the outbox event listener with memory safety.
- Implemented PostgreSQL triggers for outbox notifications in the new event_stream app.

* refactor: enhance issue serializer and event stream models

- Updated IssueSerializer and IssueCreateSerializer to manage assignees and labels more efficiently by calculating additions and removals instead of deleting all and re-adding.
- Introduced new proxy models for CycleIssue and ModuleIssue with corresponding PostgreSQL triggers for event handling.
- Refactored Outbox model to include entity type and ID for better event tracking.
- Removed outdated IssueProxy model and its associated triggers, streamlining the event stream architecture.

* chore: update base requirements for OpenSearch and add pika for RabbitMQ

- Retained django-opensearch-dsl version 0.7.0 in requirements.
- Added pika version 1.3.2 for RabbitMQ integration.

* refactor: update import paths for event stream listener

- Changed import statements in test_competitive_listeners.py, service.py, and listen_outbox_events.py to reflect the new module structure by removing the 'apiserver' prefix.

* feat: implement PostgreSQL LISTEN/NOTIFY listener for outbox events

- Added DatabaseConnection class to manage psycopg3 connections for LISTEN/NOTIFY.
- Introduced NotificationListener class to handle PostgreSQL NOTIFY messages and dispatch them to registered handlers.
- Updated Command class to utilize NotificationListener for listening to outbox events, replacing the previous restartable listener implementation.
- Improved error handling and logging throughout the listener process.

* feat: enhance event processing with advisory locks

- Implemented advisory lock mechanism to prevent concurrent processing of events.
- Added methods to acquire and release advisory locks in the DatabaseConnection class.
- Updated root_handler to fetch complete outbox data and mark events as processed only if all handlers succeed.
- Improved error handling and logging for event processing.

* fix: improve event logging and error handling in NotificationListener

- Updated event logging to include event ID for better traceability.
- Enhanced error handling in the command's handle method to log exceptions and maintain robustness during event listening.

* feat: add memory monitoring and auto-restart functionality to event listener

- Introduced MemoryMonitor class to track memory usage and event processing counts.
- Implemented automatic restarts for the NotificationListener based on memory and event limits.
- Enhanced command line options to configure memory limits, event limits, and memory check intervals.
- Improved logging for memory stats and event processing to aid in monitoring and debugging.

* feat: update local and production settings for event logging

- Introduced logging configuration for 'plane.event_stream' in both local and production settings to enhance event logging capabilities.

* chore: Implement async outbox polling mechanism with memory monitoring and event handling. Add management command for outbox poller and create necessary database migrations for outbox triggers and indexes.

* docs: Add comprehensive README for Event Stream system detailing architecture, components, configuration, usage, and performance tuning.

* feat: Enhance MongoDB integration with a singleton connection manager and implement outbox cleanup task for migrating records from PostgreSQL to MongoDB

* feat: Add asyncio support for tests and new test files for outbox polling

* Merge branch 'event-stream' of github.com:makeplane/plane-ee into event-stream

* refactor: Update event types in outbox triggers for cycle, issue, and module models; add IssueComment, IssueLink, and IssueRelation proxies with corresponding triggers

* refactor: Update import paths for JsonFormatter and consolidate OpenFeature imports; add unit tests for OutboxPoller and related classes

* refactor: Replace all_objects with objects in Outbox queries and update test fixtures for outbox records

* feat: Add daily outbox cleaner task to Celery and update type hint for MongoDB collection

* refactor: Enhance memory monitoring and outbox polling logic with improved logging and delay handling

* feat: Implement outbox triggers for issue, issue attachment, issue link, and issue relation models with dynamic event type determination

* chore: Remove obsolete files related to multiple listeners and competitive processing tests

* Delete service.py

* feat: Add outbox poller script to manage database migrations and process events with configurable parameters

* refactor: Optimize EpicCreateSerializer to handle initiative, assignee, and label updates with conflict management and improved logic for adding/removing related entities

* feat: Update issue proxy triggers for outbox events

- Removed the existing 'issue_outbox_update' trigger from the IssueProxy model.
- Added a new 'issue_outbox_update' trigger with enhanced logic to handle conversion events when the issue type changes.
- The new trigger captures updates and soft deletes, inserting appropriate events into the outbox.

* feat: Refactor issue proxy triggers and add new outbox event handling

- Removed and replaced existing triggers for IssueProxy, IssueAssigneeProxy, IssueLabelProxy, CycleIssueProxy, and ModuleIssueProxy.
- Introduced new triggers to handle outbox events for various issue-related actions, including creation, updates, and deletions.
- Enhanced logic for event type determination based on issue type, ensuring accurate event handling in the outbox.

* refactor: Update serializers to use ID fields for assignees and labels

- Changed the handling of assignees and labels in IssueCreateSerializer and EpicCreateSerializer to use ID fields instead of object references.
- Improved logic for determining assignees and labels to add or remove by using lists of IDs.
- Enhanced code readability with comments explaining the changes.

* feat: Enhance issue event handling in outbox triggers

- Updated triggers for IssueProxy, IssueAssigneeProxy, and IssueLabelProxy to determine event types based on issue type, including handling for epics.
- Introduced filtered data for outbox events to exclude description fields, improving data integrity and reducing unnecessary payload size.
- Enhanced logic for detecting changes during updates, ensuring only relevant changes are captured and processed.

* feat: implement connection pooling for outbox poller

- Introduced DatabaseConnectionPool class to manage async connection pooling using psycopg_pool.
- Enhanced outbox polling logic to utilize connection pooling for improved performance and resource management.
- Added health check and statistics retrieval methods for the connection pool.
- Updated outbox model and migration to include claimed_at field for better event tracking.
- Refactored tests to validate new connection pooling functionality.

* feat: Introduce automation engine with models and registry

- Added core components for the automation engine, including models for Automation, AutomationVersion, AutomationNode, AutomationEdge, AutomationRun, and NodeExecution.
- Implemented a NodeRegistry for managing automation nodes and a decorator for easy registration.
- Created initial files for automation app configuration and documentation, including an entity-relationship diagram and detailed model explanations.
- Established a migration for the new automation models to integrate with the existing database schema.

* refactor: move MongoConnection to a new settings module and update imports

- Created a new mongo.py file to define the MongoConnection class for managing MongoDB connections.
- Updated the import path in outbox_cleaner.py to reference the new MongoConnection location.

* refactor: update import path for MongoConnection in outbox_cleaner.py

* chore: remove scout_apm from production settings and requirements

- Deleted scout_apm from the installed apps in production.py.
- Removed scout-apm dependency from base.txt requirements.

* feat: add claimed_at field to outbox events and update requirements

- Added claimed_at field to the outbox event model for enhanced event tracking.
- Updated outbox poller to handle claimed_at in event processing.
- Included django-pgtrigger in base.txt requirements for database trigger management.

* feat: enhance memory monitoring in outbox poller

- Updated MemoryMonitor to signal for restarts instead of exiting on memory limit exceedance.
- Added methods to check for restart requests and wait for restart signals.
- Improved outbox poller logic to handle memory monitoring more gracefully during processing.
- Ensured all claimed rows are processed before initiating a restart.

* feat: implement graceful shutdown handling in outbox poller

- Added GracefulShutdownHandler class to manage shutdown signals (SIGTERM, SIGINT, SIGQUIT).
- Integrated shutdown handling into the outbox poller to allow for graceful exits during processing.
- Updated polling logic to check for shutdown requests and clean up resources accordingly.
- Enhanced command help text to reflect new signal handling capabilities.

* simplify AutomationEdge model by removing label and condition fields, and update unique constraint

* Enhance outbox event handling by adding workspace and project IDs

- Updated the outbox cleaner to include `workspace_id` and `project_id` in the deletion process.
- Modified the outbox poller to handle new fields in event processing.
- Adjusted models and migrations to support the new fields in the outbox table.
- Updated tests to ensure proper handling of workspace and project IDs in outbox records.

* chore: folder migration

* fix: type errors

* Refactor AutomationNode model and migration

- Removed `node_id`, `position_x`, `position_y`, and `execution_order` fields from the AutomationNode model.
- Updated migration to reflect the removal of constraints and adjusted the ordering of the model.
- Cleaned up the migration dependencies for better clarity.

* Add automation serializers and endpoints

- Introduced AutomationWriteSerializer and AutomationReadSerializer for handling automation data.
- Added AutomationNodeWriteSerializer and AutomationNodeReadSerializer for automation node management.
- Created AutomationEndpoint and AutomationNodeEndpoint views to manage automation and automation nodes with CRUD operations.
- Implemented permission checks for different roles on the endpoints.

* Merge branch 'preview' of github.com:makeplane/plane-ee into event-stream

* Add automation scope choices and update serializers and views

- Introduced AutomationScopeChoices for defining automation scopes.
- Updated AutomationWriteSerializer and AutomationReadSerializer to include scope validation and new fields.
- Created automation URL patterns and endpoints for managing automations.
- Implemented feature flag checks for automation-related endpoints.
- Enhanced permission checks for CRUD operations on automations.

* Refactor automation models, serializers, and views for improved structure and functionality

- Updated migration file to enhance automation-related models, including Automation, AutomationVersion, AutomationRun, AutomationNode, and AutomationEdge.
- Refactored serializers to include additional fields and validation for AutomationNode.
- Introduced new endpoints for managing AutomationNodes, including CRUD operations with feature flag checks.
- Improved URL patterns for automation and automation node management.
- Enhanced permission checks for automation-related operations.

* Add AutomationEdge serializers and endpoints for managing automation edges

- Introduced AutomationEdgeWriteSerializer and AutomationEdgeReadSerializer for handling automation edge data.
- Created AutomationEdgeEndpoint to manage CRUD operations for automation edges with appropriate feature flag checks.
- Updated URL patterns to include routes for automation edges.
- Refactored existing automation node endpoint to inherit from AutomationBaseEndpoint for consistency.

* feat: add Automation Bot type and enhance automation model

- Introduced a new BotTypeEnum value for "AUTOMATION_BOT".
- Added a OneToOneField for bot_user in the Automation model to associate a bot user with automations.
- Created a new AutomationActivity model to track activities related to automations, including fields for action, old and new values, and related entities.

* feat: add automation models and constraints

- Introduced new models for Automation, AutomationNode, AutomationRun, NodeExecution, AutomationVersion, AutomationEdge, and AutomationActivity.
- Implemented foreign key relationships and constraints to ensure data integrity, including unique constraints with conditions for deleted records.
- Added indexes to optimize query performance on various fields across the new models.
- Enhanced existing models with additional fields and relationships to support automation functionality.

* feat: rich filters store architecture and UI components

* improvement: use map instead of object for automations store

* improvement: rename automations v2 components to automations

* feat: automation nodes and edges

* feat: enhance automation functionality with new models and endpoints

- Added AutomationRun and NodeExecution models to track automation runs and their execution details.
- Introduced AutomationDetailReadSerializer to provide detailed information about automations, including nodes and edges.
- Updated AutomationEndpoint to create and manage automation bots, enhancing automation capabilities.
- Created AutomationRunEndpoint for retrieving automation run data, supporting both single and multiple run queries.
- Refactored existing serializers and views to incorporate new features and improve overall structure.

* improvement: refactor automation nodes

* feat:  publisher for pushing events from the poller to the queue

* feat: Implement RabbitMQ Event Stream Publisher and Outbox Event Model

- Added EventStreamPublisher class for reliable event publishing to RabbitMQ with support for fanout exchanges, message persistence, and concurrent access handling.
- Introduced OutboxEvent dataclass for structured representation of outbox events, including methods for conversion to various formats.
- Updated OutboxPoller to utilize the new publisher for handling outbox events, improving event processing and publishing logic.

* feat: Add logging for published messages in EventStreamPublisher

- Enhanced the EventStreamPublisher class to log published messages, including instance ID and message body for better traceability and debugging.

* feat: Enhance Outbox Poller Tests and Introduce Event Stream Publisher Tests

- Refactored test cases in `test_outbox_poller.py` to simplify row tuple creation and improve readability.
- Added new test suite for `EventStreamPublisher` in `test_publisher.py`, covering initialization, connection management, message publishing, error handling, and thread safety.
- Introduced a new `__init__.py` file in the event stream tests directory to support module structure.

---------

Co-authored-by: Dheeraj Kumar Ketireddy <dheeru0198@gmail.com>

* feat: implement automation activity tracking functionality

- Added a new module for tracking automation activities, including creation, updates, and deletions.
- Introduced functions to handle different types of automation activities and log changes to relevant fields.
- Updated AutomationEndpoint to trigger automation activity tasks upon creation, update, and deletion of automations.
- Enhanced error handling and logging for automation activity processes.

* feat: expand automation activity tracking with node and edge functionalities

- Added functions to track creation, updates, and deletions of automation nodes and edges.
- Implemented new activity types for node and edge activities in the automation activity task.
- Updated AutomationNodeEndpoint and AutomationEdgeEndpoint to trigger activity tracking upon relevant actions.
- Enhanced serialization of requested data for activity logging, ensuring accurate tracking of changes.

* feat: add automation activity tracking for activities

- Introduced AutomationActivityReadSerializer to handle serialization of automation activity data.
- Created AutomationActivityEndpoint for managing CRUD operations related to automation activities.
- Updated URL patterns to include routes for automation activities.
- Enhanced existing serializers and views to support new activity tracking functionalities.

* feat: add unit tests for automation activity tracking

- Introduced comprehensive unit tests for automation activity functions, including creation, deletion, and updates of automation activities, nodes, and edges.
- Implemented test cases to validate the tracking of field changes and ensure accurate logging of activities.
- Enhanced test coverage for various scenarios, including valid and invalid data inputs, to ensure robustness of automation activity tracking functionalities.

* feat: Implement automation execution engine and node management

- Added AutomationExecutionEngine class to handle the execution of automation workflows, including validation of events, loading of nodes, and execution of triggers, conditions, and actions.
- Introduced various node types (triggers, conditions, actions) with specific implementations for handling events and performing actions within the automation framework.
- Enhanced the automation system with auto-discovery of node modules during Django startup, ensuring all nodes are registered and ready for execution.
- Created comprehensive README documentation for automation nodes, detailing available triggers, conditions, and their configurations.
- Added error handling and logging for improved traceability during automation execution.
- Implemented tests for the new automation features to ensure reliability and correctness.

This commit lays the foundation for a robust automation system capable of responding to database events and executing defined workflows.

* Added automations to installed apps

* refactor: remove unused import in automation activity test file

* chore: automations components restructure and API integration init

* improvement: add loader for automations list table

* fix: automations settings page layout

* fix: automation list loader

* improvement: reduce add node button height

* feat: update automation modal.

* refactor: simplify label ID handling in IssueCreateSerializer

* improvement: rename `actions` to `action-buttons` in automation details sidebar.

* feat: add automation status endpoint to toggle status for different automations

* feat: automation comment actions

* chore: default last run status to None

* chore: add total success count

* chore: add total failed count

* improvement: automations list table

* chore: automation feature flag update and minor fix in status endpoint

* fix: automation status endpoint feature flag

* feat: automation details page header

* chore: remove support for multiple trigger nodes in a single automation

* feat: update automation status handling to include is_enabled flag

* improvements: minor enhancements for rich filters
* added button configuration to add filters button
* added option to disable transition for filter item
* fixed filter item label truncation
* added support for changing work item filter config keys

* improvements: add filter button config initialization

* chore: minor type name updates

* Updated migration

* Implement automation consumer and management commands for event processing

- Added AutomationConsumer class to handle RabbitMQ events and dispatch to Celery tasks.
- Created management commands for running the automation consumer and creating automations interactively.
- Introduced Celery tasks for executing automation logic and cleaning up processed events.
- Updated settings to include automation-related configurations.
- Implemented logging for better traceability of automation processes.

* Enhance automation execution engine with structured results and multiple action support

- Introduced new data classes for standardized execution context and results: ExecutionContext, NodeResult, and AutomationResult.
- Updated AutomationExecutionEngine to support multiple action nodes executed sequentially, halting on the first failure.
- Refactored node execution methods to improve clarity and maintainability.
- Enhanced error handling and logging for better traceability during automation execution.
- Updated README to reflect changes in automation execution flow and node capabilities.

* feat: enhance automation model to create bot user and update field tracking

* feat: add initiator_id field to Outbox model and update migration dependencies

* feat: condition node for automations

* chore: enable feature flag check for automation create and update status endpoint

* feat: add initiator_id to Outbox insertions across event stream models

- Updated Outbox insert statements in various models to include initiator_id.
- Adjusted related logic in CycleIssueProxy, IssueProxy, ModuleIssueProxy, and others to ensure proper tracking of the user initiating changes.
- Enhanced event handling for soft deletes and regular updates to maintain consistency in data tracking.

* feat: enable / disable automations

* feat: include initiator_id in OutboxEvent model and database interactions

- Added initiator_id field to the OutboxEvent model for enhanced tracking.
- Updated database queries in outbox_poller.py to include initiator_id in insertions.
- Ensured consistency in data handling across event stream components.

* refactor: update handle_row function to use OutboxEvent model

- Changed the parameter type of handle_row from Dict to OutboxEvent for better type safety.
- Updated logging to utilize the to_dict method of OutboxEvent for consistent event data representation.

* chore: update `edgeIdsToDelete` to `edgeIdsToRemove`

* refactor: simplify EventStreamPublisher by removing default queue and message TTL parameters, and updating setup methods for exchange only

* feat: add change property action

* TODOs

* chore: automation activity

* chore: added issue for issue created trigger

* chore: updated migrations

* chore: added priority, date and state changes

* chore: update automation migration

* chore: remove label activity

* chore: created the comment activity

* fix: logical operators casing

* feat: add docker entrypoint script for automation consumer

- Introduced a new script to manage the automation consumer process.
- The script includes commands to wait for the database and migrations before running the automation consumer.

* feat: add automation models and migrations

- Introduced new models for Automation, AutomationActivity, AutomationEdge, AutomationNode, AutomationRun, AutomationVersion, NodeExecution, and ProcessedAutomationEvent.
- Implemented necessary migrations to support the new automation features, including relationships and constraints.
- Enhanced event handling capabilities with detailed tracking and management of automation processes.

* chore: trigger main content condition preview

* chore: update condition preview limit

* chore: validated conditions for automations

* chore: added check for automation and import job

* refactor: streamline event processing by ignoring system-originated events

* fix: automation activities

* refactor: update SQL command for setting initiator type in automation and import tasks

* chore: update lxml and xmlsec versions in base requirements

* chore: update outbox cleaner cutoff days to 7 and include it in settings

* fix: update SQL command for setting initiator type in data import and bulk update tasks

* feat: add triggers for issue assignee and label management in outbox

- Implemented triggers for inserting and updating issue assignee and label data in the outbox.
- Adjusted SQL logic to handle previous attributes correctly during assignee and label updates.
- Changed trigger execution timing from AFTER to BEFORE for better handling of soft deletes.

* feat: enhance automation consumer script with queue and prefetch options

- Added support for specifying the automation events queue and prefetch count in the docker entrypoint script for the automation consumer.

* fix: update automation consumer script and event stream exchange name

- Changed the queue name in the automation consumer script to use the new environment variable for event stream.
- Updated the default exchange name in the event stream publisher to align with the new naming convention.

* refactor: update automation consumer settings and permissions

- Changed the queue name and exchange name in the automation consumer and related scripts to use new environment variables.
- Updated file permissions for the docker entrypoint script to ensure proper execution.

* chore: activity filters

* fix: activity filters

* chore: automation activity description

* chore: added new fields in automation run

* improvement: add custom automations to project settings page

* improvement: minor enhancements and fixes.

* feat: update automation consumer settings and logging configuration

* Changed default queue name for automation events in run_automation_consumer.py.
* Added logging configuration for plane.automations.consumer in both local and production settings.
* Removed unused node_execution.py file.

* minor cleanup

* chore: minor improvements

* feat: update automation execution tracking and logging

* Added logic to update the last run timestamp and increment the run count for automations.
* Enhanced the field tracking in automation activity logging to include node type for better clarity.

---------

Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
Co-authored-by: Dheeraj Kumar Ketireddy <dheeru0198@gmail.com>
Co-authored-by: pablohashescobar <nikhilschacko@gmail.com>
Co-authored-by: Nikhil <118773738+pablohashescobar@users.noreply.github.com>
Co-authored-by: NarayanBavisetti <narayan3119@gmail.com>
Co-authored-by: Bavisetti Narayan <72156168+NarayanBavisetti@users.noreply.github.com>
2025-08-12 20:34:29 +05:30
Prateek Shourya
3a0b6e39c3 [WEB-4676] feat: rich filters store architecture and UI components (#3746) 2025-08-12 19:40:26 +05:30