Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

Fix ResizeHandles props in CanvasDesigner - #78

Merged
huangyiirene merged 9 commits into
copilot/redesign-object-form-designer-againfrom
copilot/fix-action-run-issue
Jan 15, 2026
Merged

huangyiirene merged 9 commits into
copilot/redesign-object-form-designer-againfrom
copilot/fix-action-run-issue

Conversation

Copilot AI commented Jan 15, 2026 •

Copy link
Copy Markdown
Contributor

TypeScript compilation failed in CanvasDesigner.tsx because ResizeHandles was called with incorrect props: passing non-existent nodeId prop, missing required directions array, and wrong onResizeStart callback signature.

Changes

  • Import ResizeDirection type from ResizeHandle
  • Compute directions array based on component resize constraints (width/height)
  • Pass directions prop instead of nodeId to ResizeHandles
  • Update onResizeStart callback to accept both direction and e parameters
// Before
<ResizeHandles
  nodeId={node.id || ''}
  onResizeStart={(direction) => { /* ... */ }}
/>

// After
const constraints = config?.resizeConstraints || {};
const directions: ResizeDirection[] = [];
if (constraints.width !== false) directions.push('e', 'w');
if (constraints.height !== false) directions.push('n', 's');
if (constraints.width !== false && constraints.height !== false) {
  directions.push('ne', 'nw', 'se', 'sw');
}

<ResizeHandles
  directions={directions}
  onResizeStart={(direction, e) => { /* ... */ }}
/>

This aligns CanvasDesigner with the pattern already used in Canvas.tsx.

Original prompt

引用: https://github.com/objectstack-ai/objectui/actions/runs/21025710311/job/60449932067#step:6:1 fix


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix action run issue in GitHub workflow Fix ResizeHandles props in CanvasDesigner Jan 15, 2026
Copilot AI requested a review from huangyiirene January 15, 2026 09:23
Copilot AI and others added 7 commits January 15, 2026 09:26
- Remove unnecessary React import from App.tsx (jsx: react-jsx handles JSX automatically)
- Update main.tsx to use named imports instead of namespace import
- Add vite/client types to tsconfig for CSS import support

Fixes TS6133 and TS2307 errors that were causing CI build failures

Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

✅ All checks passed!

  • ✅ Type check passed
  • ✅ Tests passed
  • ✅ Lint check completed

@huangyiirene
huangyiirene marked this pull request as ready for review January 15, 2026 10:28
@huangyiirene
huangyiirene merged commit 8cdcda8 into copilot/redesign-object-form-designer-again Jan 15, 2026
os-warren pushed a commit that referenced this pull request Sep 9, 2026
…bjectui#8178)

`AIFormAssistSchema.formId` / `.objectName` / `.fields` / `.autoFill`,
`AIRecommendationsSchema.objectName` / `.maxResults` and `NLQuerySchema.objectName`
become `?: never` retirement tombstones (ADR-0049, director decision batch #78,
2026-09-07). The seven designer `inputs` entries that advertised five of those
names across the three registrations are gone, the README examples that taught
them are rewritten, and the dead `autoFill` destructure is removed.

Deletion was not available: all three schemas extend `BaseSchema`, which carries
`[key: string]: any`, so a deleted optional member is absorbed silently at any
value — the exact silent no-op the retirement ends. The tombstone is what makes
the refusal exist, and it is by name.

`AIRecommendations` now states in its docblock that it renders every item and
that there is no cap, replacing the promise `maxResults` never honoured.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w
os-warren pushed a commit that referenced this pull request Sep 9, 2026
…ig as `TreeViewConfig` (objectui#8253)

`tree` is a host-composition-only view type (objectui#5321 ruling B): on neither
authored union, reached only when a host passes a `views` prop. The per-view
`tree` block that path reads had no exported type — its only description was the
module-local, non-exported `interface TreeConfig` in `ObjectTree.tsx`. The live
host is the console, which stores view records and passes them as `views`, so a
real consumer wrote this block against nothing and a misspelled `parentFeild`
was admitted by the entry's `[key: string]: any`, stored, and never reported.

Ruled option (a) on objectui#8253 (decision batch #78, 2026-09-07, maintainer
「同意」): `packages/types` exports the config, the module-local copy becomes an
import of it, and there is no second copy.

- `types/src/views.ts` declares `TreeViewConfig`; the barrel re-exports it.
- `plugin-tree` imports it; its resolver's `ResolvedTreeConfig` is `Pick`ed off
  the one declaration and only adds requiredness for the two floored keys.
- `plugin-view` declares `ObjectViewProps.views[n].tree` as `TreeViewConfig` —
  a narrowing on a face whose index signature already admitted every spelling.
- `titleField` stays declared rather than deleted: the console's create-view
  dialog does not offer it, but the console's own composition reads it by name
  and objectui#6557 pins that rung as live behaviour.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Sep 17, 2026
…bjectui#8178) (objectstack-ai#8796)

* fix(types,plugin-ai): retire the seven zero-read AI schema members (objectui#8178)

`AIFormAssistSchema.formId` / `.objectName` / `.fields` / `.autoFill`,
`AIRecommendationsSchema.objectName` / `.maxResults` and `NLQuerySchema.objectName`
become `?: never` retirement tombstones (ADR-0049, director decision batch objectstack-ai#78,
2026-09-07). The seven designer `inputs` entries that advertised five of those
names across the three registrations are gone, the README examples that taught
them are rewritten, and the dead `autoFill` destructure is removed.

Deletion was not available: all three schemas extend `BaseSchema`, which carries
`[key: string]: any`, so a deleted optional member is absorbed silently at any
value — the exact silent no-op the retirement ends. The tombstone is what makes
the refusal exist, and it is by name.

`AIRecommendations` now states in its docblock that it renders every item and
that there is no cap, replacing the promise `maxResults` never honoured.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w

* fix(plugin-ai): compile the two objectui#8178 pins under tsc

`packages/plugin-ai/src` had no test file before objectui#8178, so its
test-type-check coverage was vacuously complete. The two pins that PR
added are the first, and no `tsc` invocation read either of them:
`node scripts/check-type-check-coverage.mjs` exits 1 on the PR head
naming both, and exits 0 on the base b6d07df. That gate also runs
unconditionally on `merge_group: checks_requested`, so it reddens the
merge queue and not just the PR.

Until now the pins ran only under vitest -- the objectui#3009 / objectstack-ai#2911
shape this guard exists to catch, where a test asserts a contract the
compiler never checked and then reads as evidence the contract holds.

Add `packages/plugin-ai/tsconfig.test.json` and chain it off
`type-check`, the convention 36 sibling packages already use.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w

---------

Co-authored-by: Claude <noreply@anthropic.com>
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Sep 17, 2026
…ig as `TreeViewConfig` (objectui#8253) (objectstack-ai#8828)

* feat(types,plugin-view,plugin-tree): export the host `tree` view config as `TreeViewConfig` (objectui#8253)

`tree` is a host-composition-only view type (objectui#5321 ruling B): on neither
authored union, reached only when a host passes a `views` prop. The per-view
`tree` block that path reads had no exported type — its only description was the
module-local, non-exported `interface TreeConfig` in `ObjectTree.tsx`. The live
host is the console, which stores view records and passes them as `views`, so a
real consumer wrote this block against nothing and a misspelled `parentFeild`
was admitted by the entry's `[key: string]: any`, stored, and never reported.

Ruled option (a) on objectui#8253 (decision batch objectstack-ai#78, 2026-09-07, maintainer
「同意」): `packages/types` exports the config, the module-local copy becomes an
import of it, and there is no second copy.

- `types/src/views.ts` declares `TreeViewConfig`; the barrel re-exports it.
- `plugin-tree` imports it; its resolver's `ResolvedTreeConfig` is `Pick`ed off
  the one declaration and only adds requiredness for the two floored keys.
- `plugin-view` declares `ObjectViewProps.views[n].tree` as `TreeViewConfig` —
  a narrowing on a face whose index signature already admitted every spelling.
- `titleField` stays declared rather than deleted: the console's create-view
  dialog does not offer it, but the console's own composition reads it by name
  and objectui#6557 pins that rung as live behaviour.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w

* fix(tooling): re-key the three ObjectView `@example` ledger rows after the +27-line declaration (objectui#8253)

`UNGATED_EXAMPLES` addresses each block by `file:LINE symbol`, so declaring
`views[n].tree` in `ObjectViewProps` — 27 lines above the component docblock —
moved all three ObjectView rows out from under their keys. `check:doc-examples`
reported them as three UNDECLARED FAILURES plus three STALE LEDGER ROWs; the
blocks and their reasons are unchanged, only the addresses. Same maintenance
objectui#8466 performs on its own row in this ledger.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w

* fix(tooling): drop the paid-off `TreeConfig` spec-collision debt row (objectui#8253)

`check:spec-symbols` records a per-package DEBT ledger of local declarations
that reuse a `@objectstack/spec` export name — "a local declaration under a
spec export's name is read by the next agent as the spec's own definition".
`@object-ui/plugin-tree` carried one row, `TreeConfig`, and this card's export
retires that declaration outright, so the gate now fails the other way: a DEBT
entry that no longer collides.

Measured on the installed `@objectstack/spec@17.3.0`: `TreeConfig` appears 38
times in its dist, `TreeViewConfig` zero. So the ruling's suggested name is not
merely a rename — it is the one that leaves the ledger empty for this package.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants