ui: frame/workspace 契約を lifecycle 変更なしで整理する

Open
#1,515 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
java
Domain
testing

Research direction

Read FrameHolder.java, NamedFrameEvent.java, and NamedFrameListener.java, then inspect their usage and the existing workspace transfer tests. Add FrameWorkspaceContractTest to check the current getter/setter boundary, event payload, listener notification paths, and Workspace serialization compatibility. Run the focused contract and transfer tests, then the full :microproject_ui:test; completion also requires git diff --check and passing PR build and GUI acceptance checks.

Written by the indexing model from the issue text.

Description

area: ui enhancement priority: low status: ready

概要

FrameHolder、NamedFrameEvent、NamedFrameListener、Workspace は frame と workspace 間の小さな契約です。イベント payload、listener 通知、workspace の型と保存互換を保ちながら、境界をテストで固定して整理します。
Workspace は Container の派生で、既存のクラス名、serialVersionUID、フィールド形状を変更できません。Java serialization の round-trip を確認します。
この作業は #738 の frame lifecycle / ownership 整理と重複させません。Refs #1445

作業手順

  1. modules/microproject_ui/src/main/java/com/microproject/ui/frame/workspace/FrameHolder.java、NamedFrameEvent.java、NamedFrameListener.java の実装と利用側を確認する。
  2. FrameWorkspaceContractTest を追加し、FrameHolder の現在の getter/setter 境界、NamedFrameEvent が保持する frame、listener の各通知経路を検証する。
  3. 同じテストで Workspace の完全修飾クラス名、UID -8443468269296437581L、宣言フィールドを固定し、インスタンスの Java serialization round-trip 後に型と保存対象の状態が保持されることを検証する。
  4. 上記4ファイルと当該契約テストに範囲を絞ってリファクタリングし、通知や既存利用側の lifecycle 挙動を変えない。
  5. GraphicManager / MainFrame / MainRibbonFrame の所有権、生成・破棄順、shutdown/recovery を移動・変更しない。これらは #738 に残す。

検証

UI 部品変更の試験として新しい契約テストと既存 workspace 転送テストを実行し、次に UI モジュール全体を実行する。既存の DefaultFrameManagerTest の lifecycle 範囲は拡張しない。

.\gradlew.bat :microproject_ui:test --tests "com.microproject.ui.frame.workspace.FrameWorkspaceContractTest" --tests "com.microproject.ui.frame.WorkspaceTransferStoreTest" --console=plain
.\gradlew.bat :microproject_ui:test --console=plain
git diff --check

完了条件

  • FrameHolder の公開契約と NamedFrameEvent / NamedFrameListener の通知動作が契約テストで確認される。
  • Workspace のクラス名、UID -8443468269296437581L、宣言フィールドが維持され、serialization round-trip テストが通る。
  • 変更差分に #738 の frame lifecycle / ownership 移行が含まれない。
  • :microproject_ui:test と git diff --check が成功する。
  • PR の build と GUI acceptance が通る。

範囲外

  • GraphicManager、MainFrame、MainRibbonFrame の lifecycle、所有権、初期化、破棄、shutdown/recovery の変更(#738)。
  • Workspace の永続化形式、クラス名、UID、フィールドの変更。
  • GUI の挙動やレイアウト変更。
Dominant language
Java
Stars
2
Forks
1
Avg merge
4h 52m
Merged PRs (30d)
349

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tetsuji16/microProject

All issues in tetsuji16/microProject

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.