Skip to content

Yjs-based Shared Editing [4/4] Add Co-editor Presence - #1676

Merged
Xiao-zhen-Liu merged 32 commits into
masterfrom
xiaozhen-yjs-shared-editing-4
Oct 6, 2022
Merged

Xiao-zhen-Liu merged 32 commits into
masterfrom
xiaozhen-yjs-shared-editing-4

Conversation

@Xiao-zhen-Liu

Copy link
Copy Markdown
Contributor

Content

This is the last piece of this series of work. Co-editor presence (awareness) features are included in this PR, including:

  • User icon of a co-editor
  • Mouse cursor of a co-editor
  • Operator highlighting status of a co-editor
  • "Currently editing" and "Changed Property" info
  • "Shadowing" mode
  • Textual co-editing within code editor and co-editor cursor information. (Original Monaco editor instead of ngx-monaco-editor is used to connect to awareness)

Xiao-zhen-Liu and others added 18 commits September 27, 2022 18:12
# Conflicts:
#	core/new-gui/src/app/workspace/service/workflow-graph/model/workflow-graph.ts
# Conflicts:
#	core/new-gui/src/app/workspace/service/execute-workflow/execute-workflow.service.ts
@zuozhiw
zuozhiw changed the base branch from master to xiaozhen-yjs-shared-editing-3 October 5, 2022 21:57

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

Left some comments. A global comment: for all methods, mark then as public if they are public, also annotate the return type, even if it's void

# Conflicts:
#	core/new-gui/src/app/workspace/component/property-editor/operator-property-edit-frame/operator-property-edit-frame.component.ts
#	core/new-gui/src/app/workspace/service/execute-workflow/execute-workflow.service.ts
#	core/new-gui/src/app/workspace/service/workflow-graph/model/workflow-action.service.ts
#	core/new-gui/src/app/workspace/service/workflow-graph/model/workflow-graph.ts
#	core/new-gui/src/app/workspace/types/command.interface.ts
…-editing-4

# Conflicts:
#	core/new-gui/src/app/app.module.ts
#	core/new-gui/src/app/workspace/component/codearea-custom-template/codearea-custom-template.component.ts
#	core/new-gui/src/app/workspace/service/workflow-graph/model/workflow-graph.ts
Base automatically changed from xiaozhen-yjs-shared-editing-3 to master October 6, 2022 05:37
# Conflicts:
#	core/new-gui/src/app/common/type/user.ts
#	core/new-gui/src/app/workspace/component/code-editor-dialog/code-editor-dialog.component.ts
#	core/new-gui/src/app/workspace/component/codearea-custom-template/codearea-custom-template.component.ts
#	core/new-gui/src/app/workspace/service/workflow-graph/model/joint-graph-wrapper.ts
#	core/new-gui/src/app/workspace/service/workflow-graph/model/shared-model-change-handler.ts
#	core/new-gui/src/app/workspace/service/workflow-graph/model/shared-model.ts
#	core/new-gui/src/app/workspace/service/workflow-graph/model/workflow-action.service.ts
#	core/new-gui/src/app/workspace/service/workflow-graph/model/workflow-graph.ts
@Xiao-zhen-Liu
Xiao-zhen-Liu merged commit 3402e64 into master Oct 6, 2022
@Xiao-zhen-Liu
Xiao-zhen-Liu deleted the xiaozhen-yjs-shared-editing-4 branch October 6, 2022 20:21
@Yicong-Huang Yicong-Huang added frontend Changes related to the frontend GUI and removed gui labels Jul 6, 2025
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
## Content
This is the last piece of this series of work. Co-editor presence (awareness) features are included in this PR, including:

- User icon of a co-editor
- Mouse cursor of a co-editor
- Operator highlighting status of a co-editor
- "Currently editing" and "Changed Property" info
- "Shadowing" mode
- Textual co-editing within code editor and co-editor cursor information. (Original Monaco editor instead of ngx-monaco-editor is used to connect to awareness)

Co-authored-by: zuozhiw <[email protected]>
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Nov 26, 2026
### What changes were proposed in this PR?

Remove code that nothing uses from the workflow persistence service, the
dashboard's workflow list, the canvas graph wrapper, a context-menu spec
and the Parca deployment files (**+48/−274 lines**). There is no
behavior change.

- **Workflow search clients:** `WorkflowPersistService.searchWorkflows`
and `retrieveWorkflowsBySessionUser` have no caller. apache#1988 removed the
last call to the first, and apache#7463 removed the project feature that
called the second. Their private response formatter, the unused
`WORKFLOW_LIST_URL`, `WORKFLOW_SEARCH_URL` and `WORKFLOW_USER_ACCESS`
constants, and the test stub's `searchWorkflows` forwarder go with them,
along with their spec cases.
- **Dashboard workflow list:** `UserWorkflowComponent` loses five dead
pieces.
- A private `nameWorkflow` copy that nothing has called since apache#2920
moved ZIP downloads into `DownloadService`, which keeps its own.
  - An unused `ExecutionMode` import.
  - An empty `next` handler around a commented-out call.
  - An unread error argument.
- A class comment whose steps name functions the component no longer
has, such as `searchWorkflows()`, `synchronousSearch()` and
`asyncSearch()`.
- **Graph wrapper:** `JointGraphWrapper` loses four unused pieces.
- The event-tuple detail, unused since apache#2301 removed the drag stream
typed with it.
  - Exports nothing imports, which become file-local.
  - A static `_async` helper that only returned `context.async`.
- A coeditor argument that `removeCurrentEditing` and
`removePropertyChanged` never read; `CoeditorPresenceService` stops
passing it.
- **Context-menu spec:** `ReactiveFormsModule`, `NzDropDownModule` and
`NzModalModule` in its two test beds are not needed. `NzModalService`
stays.
- **Parca:** `parca-agent.env` sets `PARCA_AGENT_*` variables that the
pinned agent never reads; the Compose command already passes every value
as a flag. The env file and its `env_file` entry go. The Compose
comments, README, `ParcaConfigSpec` and the release-tarball test now
point at the command's values.

| Event | PR / Commit |
| --- | --- |
| Introduced by | Workflow search clients: apache#1885 (2023-04-20);
`nameWorkflow`: apache#1629 (2022-08-17); graph wrapper: the coeditor argument
apache#1676 (2022-10-06), the context helper apache#1433 (2022-02-07); context-menu
spec: apache#2901 (2024-10-06); Parca env file: apache#5377 (2026-10-28) |
| Usage removed by | `searchWorkflows`: apache#1988 (2023-06-12).
`retrieveWorkflowsBySessionUser`: apache#7463 (2026-08-29). `nameWorkflow`:
apache#2920 (2024-10-11). Graph event detail: apache#2301 (2024-01-28). Everything
else: unused since introduction. |

As of 2026-11-25:
- The coeditor argument has gone unread for over 4 years, and the search
client has had no caller for over 2 years.
- The event-tuple detail has been unread for almost 2 years, and
`nameWorkflow` uncalled for over a year.
- The session-user client has been unused for almost 3 months, and the
Parca variables unread for the month since they were added.

### Any related issues, documentation, discussions?

Closes apache#9713.

### How was this PR tested?

Ran on this branch and on `main` at `f4adf7f588` (Windows 11; Node 24
with Yarn 4.14.1; JDK 17):

```bash
cd frontend
npx ng test --watch=false --include='**/workflow-persist.service.spec.ts' --include='**/user-workflow.component.spec.ts' --include='**/context-menu.component.spec.ts' --include='**/coeditor-presence.service.spec.ts' --include='**/joint-graph-wrapper.spec.ts'
npx tsc --noEmit -p src/tsconfig.app.json
npx tsc --noEmit -p src/tsconfig.spec.json
npx ngc -p src/tsconfig.app.json --noEmit
yarn prettier-eslint --list-different $(git diff --name-only --relative origin/main -- src)
yarn eslint $(git diff --name-only --relative origin/main -- src | grep -E '\.(ts|html)$')
cd ..
sbt "Config/testOnly org.apache.texera.observability.ParcaConfigSpec" Config/scalafmtCheckAll "Config/scalafixAll --check"
bash .github/scripts/test_create_release_tarballs.sh
(cd bin/single-node && docker compose config -q)
```

- **Frontend:** the five specs run 301 tests on this branch and 304 on
`main`, all passing.
- The three extra on `main` are the deleted methods' own cases
(`searchWorkflows`, `retrieveWorkflowsBySessionUser` and
`nameWorkflow`). Every other test keeps its name and outcome.
  - Both typechecks, the AOT compile, prettier-eslint and ESLint pass.
- **Parca:** `ParcaConfigSpec` runs 9 tests, all passing on both sides;
four of them now read the Compose command instead of the env file.
scalafmt and scalafix pass. The release-tarball regression test passes,
and `docker compose config` accepts the single-node file.

To re-check, this returns no hits on this branch:

```bash
git grep -nwE "searchWorkflows|retrieveWorkflowsBySessionUser|makeRequestAndFormatWorkflowResponse|WORKFLOW_SEARCH_URL|_async|parca-agent\.env" -- frontend/src bin common/config
```

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 5.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature frontend Changes related to the frontend GUI testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Real-time Shared Editing using Yjs: New Frontend Design

3 participants