fix(review): address PR #101 review findings (dead DI, docs)
Some checks failed
Test / test (pull_request) Has been cancelled
Some checks failed
Test / test (pull_request) Has been cancelled
- ai-chat: drop the unused pagePermissionRepo injection from PublicShareChatToolsService (its only use moved into ShareService.resolveReadableSharePage); update all 5 positional test construction sites to match the 3-arg constructor. - env: correct the anonymous share-AI per-workspace cap comment — the limiter FAILS CLOSED on Redis failure (#62), not open. - docs: sync README.ru.md with README.md — move "Page templates" from Planned to Done and drop the dead plan-doc link. Remaining test-coverage gaps tracked as #102, #103, #104, #105, #106. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -533,7 +533,6 @@ describe('PublicShareChatToolsService share scoping', () => {
|
||||
shareService as never,
|
||||
{} as never,
|
||||
{} as never,
|
||||
{} as never,
|
||||
);
|
||||
|
||||
const tools = svc.forShare('THIS-SHARE', 'ws-1');
|
||||
@@ -566,7 +565,6 @@ describe('PublicShareChatToolsService share scoping', () => {
|
||||
shareService as never,
|
||||
{} as never,
|
||||
{} as never,
|
||||
{} as never,
|
||||
);
|
||||
|
||||
const tools = svc.forShare('THIS-SHARE', 'ws-1');
|
||||
@@ -591,7 +589,6 @@ describe('PublicShareChatToolsService share scoping', () => {
|
||||
{} as never,
|
||||
searchService as never,
|
||||
{} as never,
|
||||
{} as never,
|
||||
);
|
||||
const tools = svc.forShare('THIS-SHARE', 'ws-1');
|
||||
const searchSharePages = tools.searchSharePages as {
|
||||
@@ -732,7 +729,6 @@ describe('public-share assistant boundary locks (red-team regression guards)', (
|
||||
shareService as never,
|
||||
{} as never,
|
||||
{} as never,
|
||||
{} as never,
|
||||
);
|
||||
const tools = svc.forShare('FORGED-SHARE', 'ws-1');
|
||||
const getSharePage = tools.getSharePage as {
|
||||
|
||||
@@ -24,14 +24,12 @@ describe('PublicShareChatToolsService.forShare', () => {
|
||||
};
|
||||
const searchService = { searchPage: over.searchPage ?? jest.fn() };
|
||||
const pageRepo = { findById: over.findById ?? jest.fn() };
|
||||
const pagePermissionRepo = { hasRestrictedAncestor: jest.fn() };
|
||||
const svc = new PublicShareChatToolsService(
|
||||
shareService as never,
|
||||
searchService as never,
|
||||
pageRepo as never,
|
||||
pagePermissionRepo as never,
|
||||
);
|
||||
return { svc, shareService, searchService, pageRepo, pagePermissionRepo };
|
||||
return { svc, shareService, searchService, pageRepo };
|
||||
}
|
||||
|
||||
describe('listSharePages', () => {
|
||||
|
||||
@@ -4,7 +4,6 @@ import { z } from 'zod';
|
||||
import { ShareService } from '../../share/share.service';
|
||||
import { SearchService } from '../../search/search.service';
|
||||
import { PageRepo } from '@docmost/db/repos/page/page.repo';
|
||||
import { PagePermissionRepo } from '@docmost/db/repos/page/page-permission.repo';
|
||||
import { jsonToMarkdown } from '../../../collaboration/collaboration.util';
|
||||
|
||||
/**
|
||||
@@ -35,7 +34,6 @@ export class PublicShareChatToolsService {
|
||||
private readonly shareService: ShareService,
|
||||
private readonly searchService: SearchService,
|
||||
private readonly pageRepo: PageRepo,
|
||||
private readonly pagePermissionRepo: PagePermissionRepo,
|
||||
) {}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user