Skip to content

Fix stats layout interactions#12

Merged
ka215 merged 3 commits intodevfrom
feat/stats-layout-control
Sep 30, 2025
Merged

Fix stats layout interactions#12
ka215 merged 3 commits intodevfrom
feat/stats-layout-control

Conversation

@ka215
Copy link
Contributor

@ka215 ka215 commented Sep 30, 2025

Summary

  • enforce /stats grid to follow DOM order and documented outstanding tasks
  • prevent duplicate tiles after drag by trimming layout remounts and tracked in docs
  • ensure conflict/forbidden toasts use the notices group and handle varied API payloads

Testing

  • Manual: /stats drag & drop / version conflict scenario

Copy link

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

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.

ℹ️ 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

Comment on lines 17 to +66
export const useStatsLayoutStore = defineStore("statsLayout", () => {
// デフォルト定義:
// - 小カード(凡例付円グラフなど): 2 or 3
// - 中カード(棒/集計): 4
// - 大カード(長尺ライン/ランキング): 6
const tiles = ref<TileConfig[]>([
{ id: "expense-ratio", span: 2, visible: true }, // 小
{ id: "monthly-expense", span: 4, visible: true }, // 中
{ id: "cumulative-rare-rate", span: 6, visible: true }, // 大
{ id: "app-pull-stats", span: 2, visible: true }, // 小~中
{ id: "rare-breakdown", span: 2, visible: true }, // 小
{ id: "rare-ranking", span: 2, visible: true }, // 小~中
])
const tiles = ref<StatsTileConfig[]>(cloneTiles(DEFAULT_STATS_LAYOUT.tiles))
const filters = ref<StatsLayoutFilters>(
cloneFilters(DEFAULT_STATS_LAYOUT.filters),
)
const isInitialized = ref<boolean>(false)
const isSyncing = ref<boolean>(false)
const activeUserId = ref<number | null>(null)
const remoteMeta = ref<StatsLayoutRemoteMeta>(
cloneRemoteMeta(DEFAULT_REMOTE_META),

Choose a reason for hiding this comment

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

[P0] Define missing stats layout types

The store now references StatsLayoutFilters, StatsLayoutRemoteMeta, and a filters field on StatsLayoutState, but none of these types exist in types/statsLayout.d.ts. This produces compilation errors such as “Cannot find name 'StatsLayoutFilters'” and “Property 'filters' does not exist on type 'StatsLayoutState'”, preventing Nuxt from building. Add the missing interfaces (filters, remote meta, server payload/context, etc.) or adjust the annotations so the module type-checks.

Useful? React with 👍 / 👎.

@ka215 ka215 changed the base branch from main to dev September 30, 2025 07:28
@ka215 ka215 merged commit e36899d into dev Sep 30, 2025
@ka215 ka215 deleted the feat/stats-layout-control branch September 30, 2025 07:38
@ka215 ka215 mentioned this pull request Sep 30, 2025
4 tasks
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