fix(core): disable comment in local workspace (#13124)

Close AF-2731

#### PR Dependency Tree


* **PR #13124** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Comment functionality is now available only for cloud workspaces and
is disabled for local or shared modes.

* **Bug Fixes**
* Improved accuracy in enabling comments based on workspace type and
configuration.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
L-Sun
2025-07-10 13:08:53 +08:00
committed by GitHub
parent fe00293e3e
commit 5b027f7986
2 changed files with 4 additions and 2 deletions
@@ -87,7 +87,7 @@ const usePatchSpecs = (mode: DocMode, shared?: boolean) => {
// comment may not be supported by the server
const enableComment =
serverConfig.features.includes(ServerFeature.Comment) && !shared;
isCloud && serverConfig.features.includes(ServerFeature.Comment) && !shared;
const patchedSpecs = useMemo(() => {
const manager = getViewManager()
@@ -119,7 +119,9 @@ const DetailPageImpl = memo(function DetailPageImpl() {
const serverConfig = useLiveData(serverService.server.config$);
// comment may not be supported by the server
const enableComment = serverConfig.features.includes(ServerFeature.Comment);
const enableComment =
workspace.flavour !== 'local' &&
serverConfig.features.includes(ServerFeature.Comment);
useEffect(() => {
if (isActiveView) {