Skip to content

chore: bump wystack to YW-121 (draft lifecycle + write-path)#150

Merged
youhaowei merged 1 commit into
mainfrom
chore/bump-wystack-yw121
Jun 17, 2026
Merged

chore: bump wystack to YW-121 (draft lifecycle + write-path)#150
youhaowei merged 1 commit into
mainfrom
chore/bump-wystack-yw121

Conversation

@youhaowei

@youhaowei youhaowei commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Bumps libs/wystack 4bed431b → 86fe8856, bringing YW-121 (generic draft lifecycle + overlay write-path + conflict detection) into DashFrame.

This unblocks YW-125 (DashFrame draft delta-table schema), which wires the artifact tables against the now-merged write-path seam.

Verification: full graph build + CI against the bumped submodule confirms YW-121 consumes cleanly.

🤖 Generated with Claude Code

Greptile Summary

This PR advances the libs/wystack git submodule pointer one commit forward (4bed431b → 86fe8856) to pull in YW-121, which adds a generic draft lifecycle, overlay write-path, and conflict detection. No source files in the host repo are modified.

  • The submodule bump is the sole change; all @wystack/* package consumers (commands.ts, preview-diff.ts, etc.) are unchanged and will pick up the new symbols at the next build.
  • The PR description notes that a full graph build and CI run against the bumped pointer have passed, and that YW-125 (DashFrame draft delta-table schema) is the intended downstream unblock.

Confidence Score: 5/5

A single submodule pointer advance with no host-repo source changes; CI-verified build confirms the new wystack commit integrates cleanly.

The entire change is one line updating a git submodule ref. All host-repo consumers of @wystack/* packages are untouched. The PR author reports a full graph build and CI run passed against the new pointer. There is nothing structurally risky to evaluate in the host repository itself.

No files require special attention; the only changed artifact is the submodule ref in libs/wystack.

Important Files Changed

Filename Overview
libs/wystack Submodule pointer bumped from 4bed431b to 86fe8856, bringing YW-121 (draft lifecycle, overlay write-path, conflict detection); no code changes in the host repo

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["libs/wystack submodule bump\n4bed431b to 86fe8856\nYW-121: draft lifecycle + write-path"] --> B["@wystack/db / @wystack/server / @wystack/ui\npackages consumed by host repo"]
    B --> C["apps/server - commands.ts, preview-diff.ts"]
    B --> D["packages/app-data - preview-diff.ts, insights.ts"]
    B --> E["packages/app - PreviewDiffDialog, DataSourceDisplay"]
    F["YW-125 DashFrame draft delta-table schema"] -.->|unblocked by this bump| A
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A["libs/wystack submodule bump\n4bed431b to 86fe8856\nYW-121: draft lifecycle + write-path"] --> B["@wystack/db / @wystack/server / @wystack/ui\npackages consumed by host repo"]
    B --> C["apps/server - commands.ts, preview-diff.ts"]
    B --> D["packages/app-data - preview-diff.ts, insights.ts"]
    B --> E["packages/app - PreviewDiffDialog, DataSourceDisplay"]
    F["YW-125 DashFrame draft delta-table schema"] -.->|unblocked by this bump| A
Loading

Reviews (1): Last reviewed commit: "chore: bump wystack to YW-121 (draft lif..." | Re-trigger Greptile

Brings the generic draft lifecycle (open/append/publish/discard), the
withDraft overlay write-path (into/update/delete → <table>__draft), and
generic conflict-detection into DashFrame. Unblocks YW-125 (delta-table
schema) which wires the app's artifact tables against this seam.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@linear-code

linear-code Bot commented Jun 17, 2026

Copy link
Copy Markdown

YW-121

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@youhaowei, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 28 minutes and 49 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 55208a5c-3bee-43f0-9807-e0209abeea24

📥 Commits

Reviewing files that changed from the base of the PR and between e67e8c7 and bb72111.

📒 Files selected for processing (1)
  • libs/wystack

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@youhaowei youhaowei merged commit fdf2992 into main Jun 17, 2026
6 checks passed
@youhaowei youhaowei deleted the chore/bump-wystack-yw121 branch June 17, 2026 21:31

@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: bb72111cd4

ℹ️ 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 thread libs/wystack
@@ -1 +1 @@
Subproject commit 4bed431bfeb404feede3d222053a3f3a2c3c3821
Subproject commit 86fe8856974ddec0dc797a904dcc43e850e0204d

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 filtered first() in draft appends

When this bumped WyStack lifecycle is used to append DashFrame commands, it injects a draft DB handle into the existing handlers, but the new draft select builder still rejects any prior where() on reads and its first() path delegates through that read guard. DashFrame command handlers commonly validate referenced artifacts with ctx.db.from(...).where(eq("id", ...)).first() (for example apps/server/src/functions/commands.ts:250, :501, and :1225), so appending CreateInsight/SetDataTableSchema/visualization commands to a draft will throw before the write reaches the overlay. The bump should either include filtered draft first() support or the DashFrame command paths need to avoid this pattern before relying on YW-121.

Useful? React with 👍 / 👎.

Comment thread libs/wystack
@@ -1 +1 @@
Subproject commit 4bed431bfeb404feede3d222053a3f3a2c3c3821
Subproject commit 86fe8856974ddec0dc797a904dcc43e850e0204d

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 Avoid credential vault side effects during draft append

The new draft lifecycle runs existing mutation handlers during append, but DashFrame only suppresses non-transactional vault writes/deletes when ctx.mode === "preview" (CreateDataSource/SetDataSourceConfig call applyCredentialField, and DeleteNode skips releaseCredentialRefs only in preview). A draft append that creates, updates, or deletes a credential-bearing DataSource will therefore store or release real keychain secrets before publish, and discarding the draft cannot roll those side effects back; passing preview mode through the draft context is not a fix because the same context is replayed at publish. The draft lifecycle needs a separate append-time side-effect mode or DashFrame needs draft-aware credential handling before credential commands are allowed in drafts.

Useful? React with 👍 / 👎.

Comment thread libs/wystack
@@ -1 +1 @@
Subproject commit 4bed431bfeb404feede3d222053a3f3a2c3c3821
Subproject commit 86fe8856974ddec0dc797a904dcc43e850e0204d

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 FK cascades in draft deletes

The new draft write path turns ctx.db.from(table).where(eqPk).delete() into a shadow-table tombstone, so database-level ON DELETE CASCADE effects never occur while building the draft. DashFrame's DeleteNode intentionally relies on those cascades for Insight → Visualization and DataSource → DataTable deletes, so a draft delete would hide only the parent row while child rows remain visible and untracked until publish replays the command against canonical and the real FK cascade fires. Either the draft overlay needs to emulate these cascades for affected tables, or the DashFrame delete commands need to delete owned children explicitly before this lifecycle can represent those drafts correctly.

Useful? React with 👍 / 👎.

Comment thread libs/wystack
@@ -1 +1 @@
Subproject commit 4bed431bfeb404feede3d222053a3f3a2c3c3821
Subproject commit 86fe8856974ddec0dc797a904dcc43e850e0204d

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 Apply defaults to draft-created artifact rows

Draft inserts now upsert exactly the handler-provided fields into <table>__draft, but DashFrame create commands rely on canonical database defaults for createdAt/updatedAt and omit those columns. For a draft-created row with no canonical base row, the coalesced read returns null for those defaulted timestamp columns, and existing DTO mappers call row.createdAt.getTime() (for example apps/server/src/functions/app-artifacts.ts:278, :323, :361 and apps/server/src/functions/dashboards.ts:74), so listing or opening a draft-created artifact can crash before publish. The draft insert path or DashFrame command layer needs to materialize these defaults when writing the shadow row.

Useful? React with 👍 / 👎.

Comment thread libs/wystack
@@ -1 +1 @@
Subproject commit 4bed431bfeb404feede3d222053a3f3a2c3c3821
Subproject commit 86fe8856974ddec0dc797a904dcc43e850e0204d

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 Keep parent FK validation on draft inserts

Because draft appends insert into shadow tables instead of the canonical tables, the canonical FK constraints that normally reject dangling rows are not exercised. DashFrame CreateDataTable writes dataSourceId without an explicit parent lookup and CreateVisualization does the same for insightId (apps/server/src/functions/commands.ts:476 and :1207), relying on the schema FKs in packages/server-core/src/schema.ts:82 and :148; a draft append can therefore accept and preview a DataTable or Visualization whose parent does not exist, only to fail later at publish. Add draft-aware parent validation in these commands (or equivalent FK enforcement in the overlay) before allowing these inserts through the draft lifecycle.

Useful? React with 👍 / 👎.

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