chore: remove dead code and tune frontend chunks

Remove unused production symbols, starter assets, and stale browser tooling; reduce frontend chunk fragmentation.
This commit is contained in:
2026-07-23 01:26:41 +00:00
parent 43ca5a6e36
commit 0ce8f58adb
16 changed files with 17 additions and 427 deletions

View File

@@ -63,7 +63,7 @@ describe('AttendanceController — DingTalk import scope', () => {
attendanceService.getTeacherClassDingUserIds.mockResolvedValue(['ding-1', 'ding-2']);
await controller.importFromDingTalk(
{ start: '2026-07-01', end: '2026-07-02', classId: 8, autoMatch: true },
{ start: '2026-07-01', end: '2026-07-02', classId: 8 },
{ user: { id: 21, username: 'teacher', permissions: [], isSuperAdmin: false } } as never,
);
@@ -79,7 +79,7 @@ describe('AttendanceController — DingTalk import scope', () => {
it('does not allow a teacher to supply arbitrary DingTalk user IDs', async () => {
await expect(
controller.importFromDingTalk(
{ start: '2026-07-01', end: '2026-07-02', users: 'someone-else', autoMatch: true },
{ start: '2026-07-01', end: '2026-07-02', users: 'someone-else' },
{ user: { id: 21, username: 'teacher', permissions: [], isSuperAdmin: false } } as never,
),
).rejects.toBeInstanceOf(ForbiddenException);
@@ -89,7 +89,7 @@ describe('AttendanceController — DingTalk import scope', () => {
it('requires teachers to select one of their classes', async () => {
await expect(
controller.importFromDingTalk({ start: '2026-07-01', end: '2026-07-02', autoMatch: true }, {
controller.importFromDingTalk({ start: '2026-07-01', end: '2026-07-02' }, {
user: { id: 21, username: 'teacher', permissions: [], isSuperAdmin: false },
} as never),
).rejects.toBeInstanceOf(BadRequestException);
@@ -106,11 +106,11 @@ describe('AttendanceController — DingTalk import scope', () => {
expect(attendanceService.getImportableClasses).toHaveBeenCalledWith(21, false);
});
it('always auto-matches class-scoped imports even if an old client sends autoMatch=false', async () => {
it('always auto-matches class-scoped imports', async () => {
attendanceService.getTeacherClassDingUserIds.mockResolvedValue(['ding-1']);
await controller.importFromDingTalk(
{ start: '2026-07-01', end: '2026-07-02', classId: 8, autoMatch: false },
{ start: '2026-07-01', end: '2026-07-02', classId: 8 },
{ user: { id: 21, username: 'teacher', permissions: [], isSuperAdmin: false } } as never,
);
@@ -137,7 +137,7 @@ describe('AttendanceController — DingTalk import scope', () => {
expect(attendanceService.getImportableClasses).toHaveBeenCalledWith(7, true);
await controller.importFromDingTalk(
{ start: '2026-07-01', end: '2026-07-02', users: 'ding-1,ding-2', autoMatch: true },
{ start: '2026-07-01', end: '2026-07-02', users: 'ding-1,ding-2' },
{
user: {
id: 7,

View File

@@ -27,11 +27,6 @@ export class DingTalkImportDto {
@IsOptional()
@IsString()
users?: string;
/** @deprecated Imports are always matched through DingTalk user mappings. */
@IsOptional()
@Type(() => Boolean)
autoMatch?: boolean;
}
/**