Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions apps/client/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,15 @@
"files.exclude": {
"dist/": true,
".tamagui": true
},
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
"package.json": "package-lock.json, yarn.lock, .yarnrc.yml, cspell.config.yaml, biome.json, LICENSE, .gitignore, README.md",
".env.example": ".env",
"tsconfig.json": "vite-env.d.ts, vitest.shims.d.ts",
"index.tsx": "stories.tsx",
"*.js": "${capture}.js.map, ${capture}.d.ts, ${capture}.d.ts.map",
"*.ts": "$(capture).test.ts, $(capture).test.tsx, $(capture).test.node.ts, $(capture).test.node.tsx, $(capture).test.native.ts, $(capture).test.native.tsx, $(capture).test.ios.ts, $(capture).test.ios.tsx, $(capture).test.web.ts, $(capture).test.web.tsx, $(capture).test.android.ts, $(capture).test.android.tsx, ${capture}.native.tsx, ${capture}.ios.tsx, ${capture}.android.tsx, ${capture}.web.tsx, ${capture}.native.ts, ${capture}.ios.ts, ${capture}.android.ts, ${capture}.web.ts, ${capture}.native.js, ${capture}.ios.js, ${capture}.android.js, ${capture}.web.js, ${capture}.native.jsx, ${capture}.ios.jsx, ${capture}.android.jsx, ${capture}.web.jsx, ${capture}.stories.tsx, ${capture}.story.tsx, ${capture}.stories.ts, ${capture}.stories.jsx, ${capture}.stories.js",
"*.tsx": "$(capture).test.ts, $(capture).test.tsx, $(capture).test.node.ts, $(capture).test.node.tsx, $(capture).test.native.ts, $(capture).test.native.tsx, $(capture).test.ios.ts, $(capture).test.ios.tsx, $(capture).test.web.ts, $(capture).test.web.tsx, $(capture).test.android.ts, $(capture).test.android.tsx, ${capture}.native.tsx, ${capture}.ios.tsx, ${capture}.android.tsx, ${capture}.web.tsx, ${capture}.native.ts, ${capture}.ios.ts, ${capture}.android.ts, ${capture}.web.ts, ${capture}.native.js, ${capture}.ios.js, ${capture}.android.js, ${capture}.web.js, ${capture}.native.jsx, ${capture}.ios.jsx, ${capture}.android.jsx, ${capture}.web.jsx, ${capture}.stories.tsx, ${capture}.stories.ts, ${capture}.stories.jsx, ${capture}.stories.js"
}
}
6 changes: 5 additions & 1 deletion apps/client/app.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type GenericParserBuilder, parseAsString } from "nuqs"
import { type GenericParserBuilder, parseAsBoolean, parseAsString } from "nuqs"

import { codeGlueLight } from "./src/design/editorThemes"

Expand Down Expand Up @@ -40,6 +40,9 @@ export const appConfig = {
defaultFontSize: 14,
font: "Monaspace Krypton",
},
queries: {
settings: parseAsBoolean.withDefault(false),
},
routes: {
home: { title: "Logs" }, // home is a special route name that will show without params in the URL
automations: {
Expand All @@ -57,6 +60,7 @@ export const sectionIds = Object.keys(appConfig.routes) as Array<
keyof typeof appConfig.routes
>

export type QueryIds = keyof typeof appConfig.queries
export type SectionIds = keyof typeof appConfig.routes
export type SectionTitles =
(typeof appConfig.routes)[keyof typeof appConfig.routes]["title"]
7 changes: 7 additions & 0 deletions apps/client/src/hooks/useQuery.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { useQueryState } from "nuqs"

import { appConfig, type QueryIds } from "@/config"

Check failure on line 3 in apps/client/src/hooks/useQuery.ts

View workflow job for this annotation

GitHub Actions / lint-and-build

Cannot find module '@/config' or its corresponding type declarations.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [tsc] <2307> reported by reviewdog 🐶
Cannot find module '@/config' or its corresponding type declarations.


export function useQuery(queryId: QueryIds) {
return useQueryState(queryId, appConfig.queries[queryId])
}
68 changes: 40 additions & 28 deletions apps/client/src/pages/Frame/Nav.tsx
Original file line number Diff line number Diff line change
@@ -1,47 +1,59 @@
import { useSnapshot } from "valtio"

import { Button, Column, Icon, List, ListItem } from "@code-glue/paradigm"
import { useQuery } from "@/hooks/useQuery"

Check failure on line 4 in apps/client/src/pages/Frame/Nav.tsx

View workflow job for this annotation

GitHub Actions / lint-and-build

Cannot find module '@/hooks/useQuery' or its corresponding type declarations.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [tsc] <2307> reported by reviewdog 🐶
Cannot find module '@/hooks/useQuery' or its corresponding type declarations.

import { useRouter } from "@/hooks/useRouter"
import { store } from "@/store"
import { CreateAutomation } from "../../components/CreateAutomation"
import { Header } from "../../components/Header"
import { Settings } from "./Settings"

Check failure on line 9 in apps/client/src/pages/Frame/Nav.tsx

View workflow job for this annotation

GitHub Actions / lint-and-build

Module './Settings' was resolved to '/home/runner/work/code-glue/code-glue/apps/client/src/pages/Frame/Settings.tsx', but '--jsx' is not set.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [tsc] <6142> reported by reviewdog 🐶
Module './Settings' was resolved to '/home/runner/work/code-glue/code-glue/apps/client/src/pages/Frame/Settings.tsx', but '--jsx' is not set.

export const Nav = () => {
const { automations } = useSnapshot(store)

const [{ route, automationId }, navigateTo] = useRouter()
const [isSettings, setIsSettings] = useQuery("settings")

return (
<Column grow color={"$cardStock"}>
<Header>
<img src="./headerLogo.png" alt="CodeGlue" height={42} />
<Button icon={Icon.Settings} isRaised />
<Button

Check failure on line 19 in apps/client/src/pages/Frame/Nav.tsx

View workflow job for this annotation

GitHub Actions / lint-and-build

Cannot use JSX unless the '--jsx' flag is provided.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [tsc] <17004> reported by reviewdog 🐶
Cannot use JSX unless the '--jsx' flag is provided.

icon={isSettings ? Icon.X : Icon.Settings}
isRaised
onPress={() => {
setIsSettings(!isSettings)
}}
/>
</Header>
<List.Group>
<List.Simple>
<ListItem
label="Logs"
isSelected={!route}
onPress={() => navigateTo("home")}
/>
</List.Simple>
<List.Simple header="Automations">
<CreateAutomation />
{Array.from(automations, ([, automation]) => {
return (
<ListItem
label={automation.title}
key={automation.id}
isSelected={
route === "automations" && automation.id === automationId
}
onPress={() => {
navigateTo("automations", { automationId: automation.id })
}}
/>
)
})}
</List.Simple>
</List.Group>
{isSettings ? (
<Settings />

Check failure on line 28 in apps/client/src/pages/Frame/Nav.tsx

View workflow job for this annotation

GitHub Actions / lint-and-build

Cannot use JSX unless the '--jsx' flag is provided.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [tsc] <17004> reported by reviewdog 🐶
Cannot use JSX unless the '--jsx' flag is provided.

) : (
<List.Group>

Check failure on line 30 in apps/client/src/pages/Frame/Nav.tsx

View workflow job for this annotation

GitHub Actions / lint-and-build

Cannot use JSX unless the '--jsx' flag is provided.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [tsc] <17004> reported by reviewdog 🐶
Cannot use JSX unless the '--jsx' flag is provided.

<List.Simple>

Check failure on line 31 in apps/client/src/pages/Frame/Nav.tsx

View workflow job for this annotation

GitHub Actions / lint-and-build

Cannot use JSX unless the '--jsx' flag is provided.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [tsc] <17004> reported by reviewdog 🐶
Cannot use JSX unless the '--jsx' flag is provided.

<ListItem

Check failure on line 32 in apps/client/src/pages/Frame/Nav.tsx

View workflow job for this annotation

GitHub Actions / lint-and-build

Cannot use JSX unless the '--jsx' flag is provided.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [tsc] <17004> reported by reviewdog 🐶
Cannot use JSX unless the '--jsx' flag is provided.

label="Logs"
isSelected={!route}
onPress={() => navigateTo("home")}
/>
</List.Simple>
<List.Simple header="Automations">

Check failure on line 38 in apps/client/src/pages/Frame/Nav.tsx

View workflow job for this annotation

GitHub Actions / lint-and-build

Cannot use JSX unless the '--jsx' flag is provided.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [tsc] <17004> reported by reviewdog 🐶
Cannot use JSX unless the '--jsx' flag is provided.

<CreateAutomation />

Check failure on line 39 in apps/client/src/pages/Frame/Nav.tsx

View workflow job for this annotation

GitHub Actions / lint-and-build

Cannot use JSX unless the '--jsx' flag is provided.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [tsc] <17004> reported by reviewdog 🐶
Cannot use JSX unless the '--jsx' flag is provided.

{Array.from(automations, ([, automation]) => {
return (
<ListItem

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [tsc] <17004> reported by reviewdog 🐶
Cannot use JSX unless the '--jsx' flag is provided.

label={automation.title}
key={automation.id}
isSelected={
route === "automations" && automation.id === automationId
}
onPress={() => {
navigateTo("automations", { automationId: automation.id })
}}
/>
)
})}
</List.Simple>
</List.Group>
)}
</Column>
)
}
22 changes: 22 additions & 0 deletions apps/client/src/pages/Frame/Settings.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Column, Text } from "@code-glue/paradigm"

export const Settings = () => {
return (
<Column>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [tsc] <17004> reported by reviewdog 🐶
Cannot use JSX unless the '--jsx' flag is provided.

<Text>Settings</Text>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [tsc] <17004> reported by reviewdog 🐶
Cannot use JSX unless the '--jsx' flag is provided.

<Text> Appearance (Dark/light/system) dropdown</Text>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [tsc] <17004> reported by reviewdog 🐶
Cannot use JSX unless the '--jsx' flag is provided.

<Text>------</Text>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [tsc] <17004> reported by reviewdog 🐶
Cannot use JSX unless the '--jsx' flag is provided.

<Text>Editor Theme (dropdown)</Text>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [tsc] <17004> reported by reviewdog 🐶
Cannot use JSX unless the '--jsx' flag is provided.

<Text>Typeface (dropdown)</Text>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [tsc] <17004> reported by reviewdog 🐶
Cannot use JSX unless the '--jsx' flag is provided.

<Text>Font Size (slider)</Text>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [tsc] <17004> reported by reviewdog 🐶
Cannot use JSX unless the '--jsx' flag is provided.

<Text>Width (slider)</Text>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [tsc] <17004> reported by reviewdog 🐶
Cannot use JSX unless the '--jsx' flag is provided.

<Text>Weight (slider)</Text>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [tsc] <17004> reported by reviewdog 🐶
Cannot use JSX unless the '--jsx' flag is provided.

<Text>------</Text>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [tsc] <17004> reported by reviewdog 🐶
Cannot use JSX unless the '--jsx' flag is provided.

<Text>Console Theme (dropdown)</Text>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [tsc] <17004> reported by reviewdog 🐶
Cannot use JSX unless the '--jsx' flag is provided.

<Text>Typeface (dropdown)</Text>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [tsc] <17004> reported by reviewdog 🐶
Cannot use JSX unless the '--jsx' flag is provided.

<Text>Font Size (slider)</Text>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [tsc] <17004> reported by reviewdog 🐶
Cannot use JSX unless the '--jsx' flag is provided.

<Text>Width (slider)</Text>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [tsc] <17004> reported by reviewdog 🐶
Cannot use JSX unless the '--jsx' flag is provided.

<Text>Weight (slider)</Text>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [tsc] <17004> reported by reviewdog 🐶
Cannot use JSX unless the '--jsx' flag is provided.

</Column>
)
}
Empty file removed apps/client/src/pages/Settings.tsx
Empty file.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
"typecheck": "yarn workspaces foreach -Avi run typecheck",
"clean": "sh ./scripts/clean.sh"
},
"packageManager": "yarn@4.10.3",
"packageManager": "yarn@4.12.0",
"volta": {
"node": "22.12.0",
"yarn": "4.10.3"
"yarn": "4.12.0"
},
"resolutions": {
"jsonpath-plus": "10.0.7",
Expand Down
58 changes: 29 additions & 29 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -652,18 +652,18 @@ __metadata:
languageName: node
linkType: hard

"@chromatic-com/storybook@npm:^4.1.2":
version: 4.1.3
resolution: "@chromatic-com/storybook@npm:4.1.3"
"@chromatic-com/storybook@npm:^5.0.0":
version: 5.0.0
resolution: "@chromatic-com/storybook@npm:5.0.0"
dependencies:
"@neoconfetti/react": "npm:^1.0.0"
chromatic: "npm:^13.3.3"
chromatic: "npm:^13.3.4"
filesize: "npm:^10.0.12"
jsonfile: "npm:^6.1.0"
strip-ansi: "npm:^7.1.0"
peerDependencies:
storybook: ^0.0.0-0 || ^9.0.0 || ^9.1.0-0 || ^9.2.0-0 || ^10.0.0-0 || ^10.1.0-0 || ^10.2.0-0 || ^10.3.0-0
checksum: 10/e5f33dc69442f4173cd76e8a5527d6b8a8e8c3870bd2483c2460a5e48bef5ca35b7f2b0c81209dcb10c83a8cbb629230d8a989d9a2328aa01ade8f4209e30dd1
storybook: ^0.0.0-0 || ^10.1.0 || ^10.1.0-0 || ^10.2.0-0 || ^10.3.0-0
checksum: 10/4964c1086f4aaaf5a0db80063801fafd0595546e22914dff1e6e0869dad9cf9f9cae66bd41133f1bbd0d59696923ca65e9734b76ca4a6ca13f1f97e9d4286e64
languageName: node
linkType: hard

Expand Down Expand Up @@ -703,7 +703,7 @@ __metadata:
resolution: "@code-glue/paradigm@workspace:packages/paradigm"
dependencies:
"@biomejs/biome": "npm:2.3.11"
"@chromatic-com/storybook": "npm:^4.1.2"
"@chromatic-com/storybook": "npm:^5.0.0"
"@fontsource/nunito-sans": "npm:^5.2.7"
"@storybook/addon-a11y": "npm:^10.0.7"
"@storybook/addon-docs": "npm:^10.0.7"
Expand All @@ -722,8 +722,8 @@ __metadata:
"@types/rtl-detect": "npm:^1"
"@vitejs/plugin-react": "npm:^5.0.4"
"@vitest/browser-playwright": "npm:^4.0.8"
"@vitest/coverage-v8": "npm:^4.0.8"
"@window-splitter/react": "npm:^1.1.2"
"@vitest/coverage-v8": "npm:^4.0.17"
"@window-splitter/react": "npm:^1.1.3"
browser-info: "npm:^1.3.0"
culori: "npm:^4.0.2"
dotenv: "npm:^17.2.3"
Expand Down Expand Up @@ -6120,7 +6120,7 @@ __metadata:
languageName: node
linkType: hard

"@vitest/coverage-v8@npm:^4.0.8":
"@vitest/coverage-v8@npm:^4.0.17":
version: 4.0.17
resolution: "@vitest/coverage-v8@npm:4.0.17"
dependencies:
Expand Down Expand Up @@ -6272,35 +6272,35 @@ __metadata:
languageName: node
linkType: hard

"@window-splitter/interface@npm:1.1.2":
version: 1.1.2
resolution: "@window-splitter/interface@npm:1.1.2"
"@window-splitter/interface@npm:1.1.3":
version: 1.1.3
resolution: "@window-splitter/interface@npm:1.1.3"
dependencies:
"@window-splitter/state": "npm:1.1.2"
checksum: 10/e82ae1ce08e655ab573b44522a06f0b9dd46631ceba888e791ecbee337b826f4184119b21e20be84df771185c9b1a90a7d56a122f56bbbbc4edf84527a5b9453
"@window-splitter/state": "npm:1.1.3"
checksum: 10/bf756c4c615852634231c0ccc132293d496189e33d9bee24a7809c336f33ac88aa455ec16e243f1e34e4bee7d60903f75dac0ed35c6d449a57055a97f2ceca8d
languageName: node
linkType: hard

"@window-splitter/react@npm:^1.1.2":
version: 1.1.2
resolution: "@window-splitter/react@npm:1.1.2"
"@window-splitter/react@npm:^1.1.3":
version: 1.1.3
resolution: "@window-splitter/react@npm:1.1.3"
dependencies:
"@react-aria/utils": "npm:^3.28.2"
"@window-splitter/interface": "npm:1.1.2"
"@window-splitter/state": "npm:1.1.2"
"@window-splitter/interface": "npm:1.1.3"
"@window-splitter/state": "npm:1.1.3"
peerDependencies:
react: ">=16"
react-dom: ">=16"
checksum: 10/7bb57f32fae8cbf9d2f73c9150151ca5077f5ff8965f1ae0575da92286c15f2db752a007890b96a0f12f239c5ed28a8bffdbd4c3e62e7249678faa1ca278b38e
checksum: 10/1cc4a117213cd6e2552ded3ae8621bd2c3898f1124cfd16326b108d6f5a34a006555fc76548dbb7575ebdeefef92d8bf80810b4275fff3c5e4dea59db3253e40
languageName: node
linkType: hard

"@window-splitter/state@npm:1.1.2":
version: 1.1.2
resolution: "@window-splitter/state@npm:1.1.2"
"@window-splitter/state@npm:1.1.3":
version: 1.1.3
resolution: "@window-splitter/state@npm:1.1.3"
dependencies:
big.js: "npm:^6.2.1"
checksum: 10/f8bbe2be158af3a48381bbfb4e32271ea145287cdf76ebad2757425a76e4b18d88bd31e39c13e44f6a8e29059336e253fbb43c56917f106d5011367fa84b1752
checksum: 10/dd6939a4efa6f19441e133c5acfd57ccb20f4419aded810068c9be3f203bdd94571da9b8c44b1111c32558da6a33e0bb40404f058e69e5f2164860c64dfa1b5f
languageName: node
linkType: hard

Expand Down Expand Up @@ -7207,7 +7207,7 @@ __metadata:
languageName: node
linkType: hard

"chromatic@npm:^13.3.3":
"chromatic@npm:^13.3.4":
version: 13.3.5
resolution: "chromatic@npm:13.3.5"
peerDependencies:
Expand Down Expand Up @@ -12266,11 +12266,11 @@ __metadata:
linkType: hard

"node-abi@npm:^3.3.0":
version: 3.85.0
resolution: "node-abi@npm:3.85.0"
version: 3.86.0
resolution: "node-abi@npm:3.86.0"
dependencies:
semver: "npm:^7.3.5"
checksum: 10/1d0fb9e7922431663db700aa7087c0e49bae5fd041efe2d7463d808e58be1594af8046e835fe1b17ca69f214b6327e89fb0dd5192f0e7a9bf624f5509a9104b7
checksum: 10/e1b5ed8fdca91d1d39bebb5d6394e51a02266cb4d952d21bd7b55c87e38b94f3cf7fc6162c52cf8d14a4a8aab691469fb87e10a6b0d6235685f0e3a0bf8bd6e2
languageName: node
linkType: hard

Expand Down