Skip to content

Feature/multi class - #21

Merged
Edge-HH merged 6 commits into
mainfrom
feature/multi-class
Sep 26, 2026
Merged

Edge-HH merged 6 commits into
mainfrom
feature/multi-class

Conversation

@Edge-HH

@Edge-HH Edge-HH commented Sep 26, 2026

Copy link
Copy Markdown
Owner

变更说明

关联变更

  • 功能文档 PR(RemoteCI-Docs):

检查清单

  • 只修改了本任务相关问题,没有夹带无关改动
  • 代码包含必要的注释,命名清晰,采用项目现有主流方案
  • 已运行 dotnet build RemoteCI.slnx -c Release 与 dotnet test RemoteCI.slnx -c Release
  • 手表端改动已运行 ./gradlew :app:assembleDebug :app:testDebugUnitTest
  • 用户可见功能变化已同步到 RemoteCI-Docs 文档仓库
  • 示例与文档中不包含真实密码、令牌、配对码或内部地址
  • 已阅读并遵守 行为准则 与 贡献指南

- 服务端新增班级实体与授权镜像,登录支持班级维度权限与首登设密挑战
- 插件按班级接收授权镜像并展示归属班级名称
- 移动端新增班级选择器、班级切换与按 classId 过滤的扩展策略接口
Comment thread server/RemoteCI.Server/Program.cs
Comment thread server/tests/RemoteCI.Server.Tests/ApiTests.cs
Edge-HH and others added 2 commits September 26, 2026 20:57
Co-authored-by: codefactor-io[bot] <47775046+codefactor-io[bot]@users.noreply.github.com>
Co-authored-by: codefactor-io[bot] <47775046+codefactor-io[bot]@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bdda448904

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +704 to +705
if (request.Operation.Trim().Equals("delete", StringComparison.OrdinalIgnoreCase))
await peers.DisconnectPluginClassAsync([.. request.ClassIds.Distinct()], ct);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Disconnect every class expanded from selected groups

When a delete batch includes groupIds, ClassroomService.BatchAsync expands the group into its member class IDs and successfully deletes those classes, but this cleanup only disconnects request.ClassIds. Any plugin belonging to a class reached only through the group remains connected with its in-memory credential until a later refresh, so it can continue sending state/events after deletion and the endpoint does not fulfill its immediate-disconnect behavior. Use the successful result IDs (or the fully resolved target list) when disconnecting.

Useful? React with 👍 / 👎.

Comment on lines 49 to +51
new BackupSettingsSnapshot(backup.Enabled, backup.Cadence, backup.TimeOfDay, backup.DayOfWeek, backup.MaxBackups),
state.GetLatestSchedule(), extensionPolicies, extensionPreferences);
state.GetLatestSchedule(Classroom.DefaultId), extensionPolicies, extensionPreferences,
classrooms, memberships, groups);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve schedules for non-default classes in backups

The new multi-class state store keeps schedules per class, but configuration capture serializes only state.GetLatestSchedule(Classroom.DefaultId) and restore writes that single schedule back to the default class. A backup/restore after using any other class therefore silently loses that class's latest schedule, even though the rest of its classroom and membership configuration is restored.

Useful? React with 👍 / 👎.

@Edge-HH
Edge-HH merged commit 6172344 into main Sep 26, 2026
5 of 6 checks passed
@Edge-HH
Edge-HH deleted the feature/multi-class branch September 26, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant