diff --git a/.gitignore b/.gitignore index faf7cc95a3..edb129357e 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,6 @@ *.sw* .run node_modules -ignore \ No newline at end of file +ignore +.kilo* +.claude* \ No newline at end of file diff --git a/build.log b/build.log new file mode 100644 index 0000000000..f3e3e94d58 --- /dev/null +++ b/build.log @@ -0,0 +1,175 @@ +--progress is a global compose flag, better use `docker compose --progress xx build ... +time="2026-03-23T17:17:07-06:00" level=warning msg="C:\\Projects\\Code\\corteza-toocky\\docker-compose.local.yaml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion" +#1 [internal] load local bake definitions +#1 reading from stdin 544B done +#1 DONE 0.0s + +#2 [internal] load build definition from Dockerfile.local +#2 transferring dockerfile: 7.78kB done +#2 DONE 0.0s + +#3 [internal] load metadata for docker.io/library/ubuntu:22.04 +#3 DONE 0.0s + +#4 [internal] load metadata for docker.io/library/node:22-bookworm +#4 ... + +#5 [internal] load metadata for docker.io/library/golang:1.24.1-bookworm +#5 DONE 0.2s + +#4 [internal] load metadata for docker.io/library/node:22-bookworm +#4 DONE 0.2s + +#6 [internal] load .dockerignore +#6 transferring context: 290B done +#6 DONE 0.0s + +#7 [server-build 1/10] FROM docker.io/library/golang:1.24.1-bookworm@sha256:fa1a01d362a7b9df68b021d59a124d28cae6d99ebd1a876e3557c4dd092f1b1d +#7 DONE 0.0s + +#8 [runtime 1/17] FROM docker.io/library/ubuntu:22.04 +#8 DONE 0.0s + +#9 [webapps-deps 1/9] FROM docker.io/library/node:22-bookworm@sha256:f90672bf4c76dfc077d17be4c115b1ae7731d2e8558b457d86bca42aeb193866 +#9 DONE 0.0s + +#10 [internal] load build context +#10 transferring context: 749.31kB 0.7s done +#10 DONE 0.8s + +#11 [webapps-deps 2/9] RUN apt-get -y update && apt-get install -y git make && rm -rf /var/lib/apt/lists/* +#11 CACHED + +#12 [webapps-deps 4/9] WORKDIR /build +#12 CACHED + +#13 [webapps-deps 6/9] COPY lib/ ./lib/ +#13 CACHED + +#14 [webapps-deps 3/9] RUN npm install -g @vue/cli-service +#14 CACHED + +#15 [webapps-deps 5/9] COPY client/ ./client/ +#15 CACHED + +#16 [webapps-deps 7/9] RUN ls /build/lib/js/src/ | grep cast || echo "CAST.TS NOT FOUND" +#16 CACHED + +#17 [server-build 3/10] WORKDIR /build/server +#17 CACHED + +#18 [server-build 6/10] COPY server/ ./ +#18 CACHED + +#19 [server-build 2/10] RUN apt-get -y update && apt-get install -y git make gcc libc6-dev && rm -rf /var/lib/apt/lists/* +#19 CACHED + +#20 [server-build 5/10] RUN go mod download +#20 CACHED + +#21 [server-build 7/10] COPY locale/ ./locale/ +#21 CACHED + +#22 [server-build 4/10] COPY server/go.mod server/go.sum ./ +#22 CACHED + +#23 [server-build 8/10] RUN mkdir -p pkg/locale/src/en && cp -r locale/en/* pkg/locale/src/en/ +#23 CACHED + +#24 [server-build 9/10] COPY README.md LICENSE DCO ./ +#24 CACHED + +#25 [server-build 10/10] RUN CGO_ENABLED=1 go build -o corteza-server ./cmd/corteza +#25 ... + +#26 [webapps-deps 8/9] RUN ls /build/lib/js/src/ | grep cast || echo "CAST.TS NOT FOUND" +#26 0.377 cast.test.ts +#26 0.377 cast.ts +#26 DONE 0.5s + +#27 [webapps-deps 9/9] RUN cd lib && make fresh +#27 0.784 ---Fresh js--- +#27 1.177 yarn install v1.22.22 +#27 1.210 info No lockfile found. +#27 1.219 [1/5] Validating package.json... +#27 1.224 [2/5] Resolving packages... +#27 13.27 warning eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options. +#27 14.21 warning eslint > @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead +#27 14.66 warning eslint > @humanwhocodes/config-array > @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead +#27 14.88 warning eslint > file-entry-cache > flat-cache > rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported +#27 15.09 warning eslint > file-entry-cache > flat-cache > rimraf > glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me +#27 15.27 warning eslint > file-entry-cache > flat-cache > rimraf > glob > inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. +#27 19.82 warning mocha > glob@10.5.0: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me +#27 23.53 warning ts-sinon > sinon@9.2.4: 16.1.1 +#27 23.77 warning ts-sinon > sinon > nise > @sinonjs/text-encoding@0.7.3: Deprecated: no longer maintained and no longer used by Sinon packages. See +#27 23.77 https://github.com/sinonjs/nise/issues/243 for replacement details. +#27 23.81 warning ts-sinon > sinon > @sinonjs/samsam > lodash.get@4.4.2: This package is deprecated. Use the optional chaining (?.) operator instead. +#27 26.35 [3/5] Fetching packages... +#27 69.25 [4/5] Linking dependencies... +#27 72.63 [5/5] Building fresh packages... +#27 72.83 success Saved lockfile. +#27 72.84 Done in 71.67s. +#27 73.12 yarn link v1.22.22 +#27 73.16 success Registered "@cortezaproject/corteza-js". +#27 73.16 info You can now run `yarn link "@cortezaproject/corteza-js"` in the projects where you want to use this package and it will be used instead. +#27 73.16 Done in 0.05s. +#27 73.37 yarn run v1.22.22 +#27 73.41 $ rollup -c --environment BUILD:production +#27 74.08  +#27 74.08 src/index.ts  dist/index.cjs, dist/index.js... +#27 76.12 [!] RollupError: There was an error during the build: +#27 76.12 Could not resolve "./corredor" from "src/index.ts" +#27 76.12 Additionally, handling the error in the 'buildEnd' hook caused the following error: +#27 76.12 [plugin rpt2] src/index.ts: Could not resolve "./corredor" from "src/index.ts" +#27 76.12 src/index.ts +#27 76.12  at Object.getRollupError (/build/lib/js/node_modules/rollup/dist/shared/parseAst.js:289:41) +#27 76.12 at /build/lib/js/node_modules/rollup/dist/shared/rollup.js:23859:51 +#27 76.12 at catchUnfinishedHookActions (/build/lib/js/node_modules/rollup/dist/shared/rollup.js:23352:16) +#27 76.12 at rollupInternal (/build/lib/js/node_modules/rollup/dist/shared/rollup.js:23842:5) +#27 76.12 at build (/build/lib/js/node_modules/rollup/dist/bin/rollup:1722:55) +#27 76.12 at runRollup (/build/lib/js/node_modules/rollup/dist/bin/rollup:1858:21) +#27 76.12 +#27 76.12 +#27 76.16 error Command failed with exit code 1. +#27 76.16 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +#27 76.18 Failed to fresh js +#27 76.18 make: *** [Makefile:33: fresh] Error 1 +#27 ERROR: process "/bin/sh -c cd lib && make fresh" did not complete successfully: exit code: 2 + +#25 [server-build 10/10] RUN CGO_ENABLED=1 go build -o corteza-server ./cmd/corteza +#25 CANCELED +------ + > [webapps-deps 9/9] RUN cd lib && make fresh: +76.12 at catchUnfinishedHookActions (/build/lib/js/node_modules/rollup/dist/shared/rollup.js:23352:16) +76.12 at rollupInternal (/build/lib/js/node_modules/rollup/dist/shared/rollup.js:23842:5) +76.12 at build (/build/lib/js/node_modules/rollup/dist/bin/rollup:1722:55) +76.12 at runRollup (/build/lib/js/node_modules/rollup/dist/bin/rollup:1858:21) +76.12 +76.12 +76.16 error Command failed with exit code 1. +76.16 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +76.18 Failed to fresh js +76.18 make: *** [Makefile:33: fresh] Error 1 +------ +Dockerfile.local:78 + +-------------------- + + 76 | ENV BUILD_VERSION=$BUILD_VERSION + + 77 | # Install libraries for all webapps (sequential but only once) + + 78 | >>> RUN cd lib && make fresh + + 79 | ################################################################################ + + 80 | # Stage 3b: Build WebApps in Parallel (via BuildKit) + +-------------------- + +failed to solve: process "/bin/sh -c cd lib && make fresh" did not complete successfully: exit code: 2 + + + +View build details: docker-desktop://dashboard/build/default/default/rw8bsoh218u784y69dshendpw + diff --git a/client/web/compose/src/assets/PageBlocks/index.js b/client/web/compose/src/assets/PageBlocks/index.js index 654fbc1182..194e0f95bf 100644 --- a/client/web/compose/src/assets/PageBlocks/index.js +++ b/client/web/compose/src/assets/PageBlocks/index.js @@ -16,3 +16,5 @@ export const Progress = require('./Progress.png') export const Geometry = require('./Geometry.png') export const Tabs = require('./Tabs.png') export const Navigation = require('./Navigation.png') +export const CollapsibleRecord = require('./Record.png') +export const CollapsibleRecordList = require('./RecordList.png') diff --git a/client/web/compose/src/components/Admin/Page/Builder/Selector.vue b/client/web/compose/src/components/Admin/Page/Builder/Selector.vue index 5ebf7b4232..825361f676 100644 --- a/client/web/compose/src/components/Admin/Page/Builder/Selector.vue +++ b/client/web/compose/src/components/Admin/Page/Builder/Selector.vue @@ -160,6 +160,17 @@ export default { image: images.Record, recordPageOnly: true, }, + { + label: this.$t('collapsibleRecord.label'), + block: new compose.PageBlockCollapsibleRecord(), + image: images.CollapsibleRecord, + recordPageOnly: true, + }, + { + label: this.$t('collapsibleRecordList.label'), + block: new compose.PageBlockCollapsibleRecordList(), + image: images.CollapsibleRecordList, + }, { label: this.$t('recordList.label'), block: new compose.PageBlockRecordList(), diff --git a/client/web/compose/src/components/Common/Grid.vue b/client/web/compose/src/components/Common/Grid.vue index c5297c63a4..af5404ed8d 100644 --- a/client/web/compose/src/components/Common/Grid.vue +++ b/client/web/compose/src/components/Common/Grid.vue @@ -49,6 +49,7 @@ :block-index="item.i" :resizing="resizing" :loading-record="loadingRecord" + :on-block-height-change="onBlockHeightChange" v-on="$listeners" /> @@ -101,6 +102,9 @@ export default { layout: [], resizing: false, + + // Track which blocks have been programmatically modified (e.g., collapse/expand) + programmaticHeightChanges: {}, } }, @@ -131,9 +135,16 @@ export default { immediate: true, deep: true, handler (blocks) { + const programmaticChanges = this.programmaticHeightChanges + const now = Date.now() const layout = blocks.map(({ meta = {}, xywh = [] }, i) => { const [x = 0, y = 0, w = 48, h = 15] = (xywh || []).map(v => Number(v) || 0) + // Skip blocks that were recently programmatically changed + if (programmaticChanges[i] && (now - programmaticChanges[i].timestamp) < 500) { + return this.layout[i] || { i, x, y, w, h } + } + // To avoid collision with hidden elements if (meta.hidden || (meta.invisible && !this.editable)) { return null @@ -186,6 +197,27 @@ export default { // Force the grid layout to recalculate its dimensions window.dispatchEvent(new Event('resize')) }, + + onBlockHeightChange ({ blockIndex, newHeight }) { + // Only handle height changes in view mode (not in the page builder) + if (this.editable) return + + // Mark this block as programmatically changed so the watcher doesn't reset it + this.$set(this.programmaticHeightChanges, blockIndex, { + h: newHeight, + timestamp: Date.now(), + }) + + // Find the layout item by blockIndex (which is the 'i' property) + const item = this.layout.find(l => l.i === blockIndex) + if (item) { + this.$set(item, 'h', newHeight) + // Force the grid to recalculate after height change + this.$nextTick(() => { + this.forceRerender() + }) + } + }, }, } diff --git a/client/web/compose/src/components/PageBlocks/CollapsibleRecordBase.vue b/client/web/compose/src/components/PageBlocks/CollapsibleRecordBase.vue new file mode 100644 index 0000000000..ed58b77c1d --- /dev/null +++ b/client/web/compose/src/components/PageBlocks/CollapsibleRecordBase.vue @@ -0,0 +1,729 @@ + + + + + diff --git a/client/web/compose/src/components/PageBlocks/CollapsibleRecordConfigurator.vue b/client/web/compose/src/components/PageBlocks/CollapsibleRecordConfigurator.vue new file mode 100644 index 0000000000..189c288fa7 --- /dev/null +++ b/client/web/compose/src/components/PageBlocks/CollapsibleRecordConfigurator.vue @@ -0,0 +1,507 @@ + + + diff --git a/client/web/compose/src/components/PageBlocks/CollapsibleRecordEditor.vue b/client/web/compose/src/components/PageBlocks/CollapsibleRecordEditor.vue new file mode 100644 index 0000000000..84993221c4 --- /dev/null +++ b/client/web/compose/src/components/PageBlocks/CollapsibleRecordEditor.vue @@ -0,0 +1,604 @@ + + + + + + + \ No newline at end of file diff --git a/client/web/compose/src/components/PageBlocks/CollapsibleRecordListBase.vue b/client/web/compose/src/components/PageBlocks/CollapsibleRecordListBase.vue new file mode 100644 index 0000000000..deb7d1e698 --- /dev/null +++ b/client/web/compose/src/components/PageBlocks/CollapsibleRecordListBase.vue @@ -0,0 +1,899 @@ + + + + + diff --git a/client/web/compose/src/components/PageBlocks/CollapsibleRecordListConfigurator.vue b/client/web/compose/src/components/PageBlocks/CollapsibleRecordListConfigurator.vue new file mode 100644 index 0000000000..7f98e69b11 --- /dev/null +++ b/client/web/compose/src/components/PageBlocks/CollapsibleRecordListConfigurator.vue @@ -0,0 +1,839 @@ + + + diff --git a/client/web/compose/src/components/PageBlocks/index.js b/client/web/compose/src/components/PageBlocks/index.js index 3824bc4235..6ec15b7ba6 100644 --- a/client/web/compose/src/components/PageBlocks/index.js +++ b/client/web/compose/src/components/PageBlocks/index.js @@ -11,6 +11,11 @@ import CommentBase from './Comment/Base' import CommentConfigurator from './Comment/Configurator' import ContentBase from './ContentBase' import ContentConfigurator from './ContentConfigurator' +import CollapsibleRecordBase from './CollapsibleRecordBase' +import CollapsibleRecordConfigurator from './CollapsibleRecordConfigurator' +import CollapsibleRecordEditor from './CollapsibleRecordEditor' +import CollapsibleRecordListBase from './CollapsibleRecordListBase' +import CollapsibleRecordListConfigurator from './CollapsibleRecordListConfigurator' import FileBase from './FileBase' import FileConfigurator from './FileConfigurator' import GeometryBase from './GeometryBase' @@ -73,6 +78,11 @@ const Registry = { MetricConfigurator, CommentBase, CommentConfigurator, + CollapsibleRecordBase, + CollapsibleRecordConfigurator, + CollapsibleRecordEditor, + CollapsibleRecordListBase, + CollapsibleRecordListConfigurator, ProgressBase, ProgressConfigurator, GeometryBase, diff --git a/client/web/compose/src/components/Public/Page/Grid.vue b/client/web/compose/src/components/Public/Page/Grid.vue index 3f245e5195..8af6a5002e 100644 --- a/client/web/compose/src/components/Public/Page/Grid.vue +++ b/client/web/compose/src/components/Public/Page/Grid.vue @@ -4,7 +4,7 @@ :editable="false" >