Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newly published versions of package managers distributed from npm cannot be installed due to key id mismatch #612

Open
sapphi-red opened this issue Jan 27, 2025 · 63 comments · May be fixed by #647

Comments

@sapphi-red
Copy link

This is probably related to #611.

When I try to install pnpm 10.1.0, I get the following error:

C:\Program Files\nodejs\node_modules\corepack\dist\lib\corepack.cjs:21535
  if (key == null || signature == null) throw new Error(`Cannot find matching keyid: ${JSON.stringify({ signatures, keys })}`);
                                              ^

Error: Cannot find matching keyid: {"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDlkgmNyZjT7KUY8AO6jH7Gs3fyiXG8nbTnuLbd8fOS2AIgXyJ6SaYhumMFzUYQAZPJGhsnlaD5N0X2MZsbG+eS/Xo="}],"keys":[{"expires":null,"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","keytype":"ecdsa-sha2-nistp256","scheme":"ecdsa-sha2-nistp256","key":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1Olb3zMAFFxXKHiIkQO5cJ3Yhl5i6UPp+IhuteBJbuHcA5UogKo0EWtlWwW6KSaKoTNEYL7JlCQiVnkhBktUgg=="}]}
    at verifySignature (C:\Program Files\nodejs\node_modules\corepack\dist\lib\corepack.cjs:21535:47)
    at installVersion (C:\Program Files\nodejs\node_modules\corepack\dist\lib\corepack.cjs:21882:7)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async Engine.ensurePackageManager (C:\Program Files\nodejs\node_modules\corepack\dist\lib\corepack.cjs:22316:32)
    at async Engine.executePackageManagerRequest (C:\Program Files\nodejs\node_modules\corepack\dist\lib\corepack.cjs:22416:25)
    at async Object.runMain (C:\Program Files\nodejs\node_modules\corepack\dist\lib\corepack.cjs:23102:5)        

Node.js v22.13.0

I checked https://registry.npmjs.org/pnpm/10.1.0 and it contains

{
  "signatures": [
    {
      "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U",
      "sig": "MEUCIQDlkgmNyZjT7KUY8AO6jH7Gs3fyiXG8nbTnuLbd8fOS2AIgXyJ6SaYhumMFzUYQAZPJGhsnlaD5N0X2MZsbG+eS/Xo="
    }
  ]
}

which has the same key id distributed at https://registry.npmjs.org/-/npm/v1/keys.
On the other hand, [email protected] (https://registry.npmjs.org/pnpm/10.0.0) has:

{
  "signatures": [
    {
      "sig": "MEUCIBhQnfDt9V8tw3FnrqHdMokyqJJtYX7HhR5NxvfggwP/AiEAiQQ74inA/JVI5IHN0piTLb2LhSUPJAkYYsGgM8DTrCI=",
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
    }
  ]
}

which has the same key id in config.json.

"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Jan 27, 2025

@sapphi-red

I can reproduce this issue on Windows 11 and Ubuntu 24.04.1 LTS with

corepack use [email protected]

Cannot find matching keyid


corepack use [email protected]

has no issue, so you might change your subject to be specifically 10.1.0 instead of the generic "Newly published versions".

Also, this should probably be reported to https://github.com/pnpm/pnpm/issues
cc: @zkochan

@SenseiMarv
Copy link

SenseiMarv commented Jan 27, 2025

I can confirm that the same issue happens for us as well in our GitLab Pipeline:

$ corepack enable && corepack prepare --activate
Preparing [email protected] for immediate activation...
Internal Error: Cannot find matching keyid: {"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDlkgmNyZjT7KUY8AO6jH7Gs3fyiXG8nbTnuLbd8fOS2AIgXyJ6SaYhumMFzUYQAZPJGhsnlaD5N0X2MZsbG+eS/Xo="}],"keys":[{"expires":null,"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","keytype":"ecdsa-sha2-nistp256","scheme":"ecdsa-sha2-nistp256","key":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1Olb3zMAFFxXKHiIkQO5cJ3Yhl5i6UPp+IhuteBJbuHcA5UogKo0EWtlWwW6KSaKoTNEYL7JlCQiVnkhBktUgg=="}]}
    at verifySignature (/usr/lib/node_modules/corepack/dist/lib/corepack.cjs:21535:47)
    at installVersion (/usr/lib/node_modules/corepack/dist/lib/corepack.cjs:21882:7)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async Engine.ensurePackageManager (/usr/lib/node_modules/corepack/dist/lib/corepack.cjs:22316:32)
    at async PrepareCommand.execute (/usr/lib/node_modules/corepack/dist/lib/corepack.cjs:23025:27)
    at async PrepareCommand.validateAndExecute (/usr/lib/node_modules/corepack/dist/lib/corepack.cjs:19835:22)
    at async _Cli.run (/usr/lib/node_modules/corepack/dist/lib/corepack.cjs:20772:18)
    at async Object.runMain (/usr/lib/node_modules/corepack/dist/lib/corepack.cjs:23097:19)

@sapphi-red
Copy link
Author

I assume the signatures are generated by npm registry and pnpm has no control over it. I'll change the issue name to specifically 10.1.0, but I believe any versions that are published from now on will be affected, as I think it's caused by npm registry's key rotation.
I wonder if the npm registry had to rotate the key immediately (and not in a gradual manner) due to some vulnerability discovery.

@sapphi-red sapphi-red changed the title Newly published versions of package managers distributed from npm cannot be installed due to key id mismatch [email protected] cannot be installed due to key id mismatch Jan 27, 2025
@sapphi-red
Copy link
Author

For those who are facing this issue like me, you can add COREPACK_INTEGRITY_KEYS=0 env var to skip the signature check.

@DaveEvans-Thalamos
Copy link

We're pinned to 9.15.4 and seeing this on CI, so it's not limited to 10.1.0

@sapphi-red sapphi-red changed the title [email protected] cannot be installed due to key id mismatch [email protected] / [email protected] cannot be installed due to key id mismatch Jan 27, 2025
@DaveEvans-Thalamos
Copy link

For those who are facing this issue like me, you can add COREPACK_INTEGRITY_KEYS=0 env var to skip the signature check.

Whilst this may work around the issue and is tempting, if there is an undisclosed vulnerability behind all of this as you speculate, then ignoring the key integrity might result in running evil code.

@MikeMcC399
Copy link
Contributor

@sapphi-red

I assume the signatures are generated by npm registry and pnpm has no control over it. I'll change the issue name to specifically 10.1.0, but I believe any versions that are published from now on will be affected, as I think it's caused by npm registry's key rotation. I wonder if the npm registry had to rotate the key immediately (and not in a gradual manner) due to some vulnerability discovery.

@sapphi-red
Copy link
Author

For those who are facing this issue like me, you can add COREPACK_INTEGRITY_KEYS=0 env var to skip the signature check.

Whilst this may work around the issue and is tempting, if there is an undisclosed vulnerability behind all of this as you speculate, then ignoring the key integrity might result in running evil code.

Isn't it the opposite? If the key was rotated, the old key cannot be trusted and the new key can be trusted. The current corepack only checks the old key. To be strictly safe, you shouldn't install any packages signatured with the old key and only use packages signatured with the new key, and given that corepack does not check the signature with the new key, you need to manually check it.

@sapphi-red
Copy link
Author

  • I don't know the reason for the two different keys and probably it should be raised to https://www.npmjs.com/support for clarification / remediation.

I've sent a message there linking this and that issue 👍

@MikeMcC399
Copy link
Contributor

@hmaack
Copy link

hmaack commented Jan 27, 2025

While using the latest-10 tag is not working right now, a pinned version can help to get your CI running 🐌

corepack prepare [email protected] --activate

julienp added a commit to pulumi/pulumi that referenced this issue Jan 27, 2025
Due to nodejs/corepack#612 we had to pin `pnpm` to 10.0.0 in `sdk/nodejs/tests/runtime/install-package-tests.ts`
@kachkaev
Copy link

kachkaev commented Jan 27, 2025

I ended up installing [email protected] globally (can be done with their one-liner / npm install --global [email protected] / mise / etc.). New v10 has manage-package-manager-versions enabled by default, which substitutes corepack. When inside a project directory, globally installed pnpm v10 checks package.jsonpackageManager and automatically substitutes itself with the exact version specified.

So unless you rely on corepack to manage Yarn as well, it is no longer needed. The only exception I see is CI when you can avoid two pnpm downloads with one, via corepack enable.

@wraithgar
Copy link

https://registry.npmjs.org/-/npm/v1/keys should now be returning two keys. During key rotation the old one was omitted by mistake and has since been re-added. CDN caching will of course take a little time to catch up but both the SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA key (which was used to sign tarballs up until last week) and the SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U key (which is being used going forward) are both in that endpoint, which should allow folks to verify signatures again.

@MikeMcC399
Copy link
Contributor

@wraithgar

Many thanks for fixing the keys on https://registry.npmjs.org/-/npm/v1/keys ! Viewing with Postman I now see

{
    "keys": [
        {
            "expires": "2025-01-29T00:00:00.000Z",
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "keytype": "ecdsa-sha2-nistp256",
            "scheme": "ecdsa-sha2-nistp256",
            "key": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1Olb3zMAFFxXKHiIkQO5cJ3Yhl5i6UPp+IhuteBJbuHcA5UogKo0EWtlWwW6KSaKoTNEYL7JlCQiVnkhBktUgg=="
        },
        {
            "expires": null,
            "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U",
            "keytype": "ecdsa-sha2-nistp256",
            "scheme": "ecdsa-sha2-nistp256",
            "key": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEY6Ya7W++7aUPzvMTrezH6Ycx3c+HOKYCcNGybJZSCJq/fd7Qa8uuAKtdIkUQtQiEKERhAmE5lMMJhP8OkDOa2g=="
        }
    ]
}

@MikeMcC399

This comment has been minimized.

@MikeMcC399
Copy link
Contributor

As mentioned by @DaveEvans-Thalamos in #612 (comment) ⬆, the keys can be ignored as a workaround, for example in a bash shell:

COREPACK_INTEGRITY_KEYS=0 corepack use [email protected]

@MikeMcC399

This comment has been minimized.

@MikeMcC399
Copy link
Contributor

@sapphi-red

There has been a new release [email protected] with updated npm keys.

After a manual install:

npm install -g corepack@latest

I was then able to execute the following successfully:

corepack use [email protected]

@rubybui
Copy link

rubybui commented Jan 28, 2025

Thank you. Add this into my workflow file works like a charm.
- name: Update Corepack to the Latest Version
shell: bash
run: npm install -g corepack@latest

PS Adding " Cannot find matching keyid: {"signatures":" corepack github action for easier search to this thread.

@EndangeredMassa
Copy link

The PR to fix this is great, but was published in a corepack version (0.31.0) that removed support for Node 21 (and presumably lower). I still need this fix for older Node versions that still have LTS support, like 18 and 20.

Can we get another version published (like 0.30.1 based on 0.30.0) that includes only they patch to keys?

@MikeMcC399
Copy link
Contributor

@BeyondEvil

latest won't work for us as this our production build.

So does that mean you can't use npm install -g [email protected] either?

But thanks for taking the time, really appreciate it! 🙏

You're very welcome! I'm just trying to work out how to use Corepack for my own purposes and seem to have got caught up in events here!

@MikeMcC399
Copy link
Contributor

JavaScript GitHub Actions are also impacted where Corepack is used inside an action. It's not possible to update Corepack inside the action. It needs Node.js to distribute a new version of Corepack and GitHub Actions needs to set this version corresponding to the runs.using parameter.

@esausilva
Copy link

While using the latest-10 tag is not working right now, a pinned version can help to get your CI running 🐌

corepack prepare [email protected] --activate

This worked for my Dockerfile and Node 23.6.1

RUN corepack prepare [email protected] --activate && corepack enable pnpm && pnpm run build

JavaScript GitHub Actions are also impacted where Corepack is used inside an action. It's not possible to update Corepack inside the action. It needs Node.js to distribute a new version of Corepack and GitHub Actions needs to set this version corresponding to the runs.using parameter.

And looks like Node already updated Corepack as specifying the latest Node (23.7.0) in my Docker file I'm able to run it as usual

corepack enable pnpm && pnpm run build

@MikeMcC399
Copy link
Contributor

@esausilva

And looks like Node already updated Corepack as specifying the latest Node (23.7.0) in my Docker file I'm able to run it as usual

corepack enable pnpm && pnpm run build

That is correct. Node.js 23.7.0 already contains Corepack 0.31.0

@FelixBlaisThon
Copy link

I have tried

corepack enabled && corepack prepare --activate

In my github actions for a job that basically install Node, npm and pnpm while I have "packageManager": "[email protected]" in my package.json. Yet, I still get the error in my github's CI... Is there a way to explicitly target corepack 0.31.0 (the one with the key fix) without bumping to ode 23 (which is not LTS yet)

I am on Node v22.11.0

@MikeMcC399
Copy link
Contributor

@FelixBlaisThon

Is there a way to explicitly target corepack 0.31.0 (the one with the key fix) without bumping to ode 23 (which is not LTS yet)

I am on Node v22.11.0

In GitHub Actions I used the following:

      - name: Set alternate npm integrity keys
        run: |
          echo COREPACK_INTEGRITY_KEYS="$(curl https://registry.npmjs.org/-/npm/v1/keys | jq -c '{npm: .keys}')" >> $GITHUB_ENV

which works for any version of Node.js.

@BeyondEvil
Copy link

@BeyondEvil

latest won't work for us as this our production build.

So does that mean you can't use npm install -g [email protected] either?

Technically that would work, but the question becomes how we keep parity between local dev, CI and Docker/production without too much maintenance.

But thanks for taking the time, really appreciate it! 🙏

You're very welcome! I'm just trying to work out how to use Corepack for my own purposes and seem to have got caught up in events here!

It happens! 😅

@Jasonzyt
Copy link

Jasonzyt commented Feb 3, 2025

@MikeMcC399

In GitHub Actions I used the following:

  - name: Set alternate npm integrity keys
    run: |
      echo COREPACK_INTEGRITY_KEYS="$(curl https://registry.npmjs.org/-/npm/v1/keys | jq -c '{npm: .keys}')" >> $GITHUB_ENV

which works for any version of Node.js.

It works! Thanks a lot! 👍

@aduh95
Copy link
Contributor

aduh95 commented Feb 3, 2025

I would recommend against curl the registry keys or the shasum; though it can unblock you, you have to understand you are trusting HTTPS when doing that, and you might as well disable signature verification at this point (the signature verification is a redundant security mechanism that only makes sense to do if you are not fetching the keys via HTTPS).

Ideally the workaround would be to use latest version of Corepack. However, if that's not an option, you can either:

  • If you trust HTTPS, set COREPACK_INTEGRITY_KEYS to 0 to skip the signature verification. Corepack will still verifies the integrity of the download by comparing the shasum with the one found in the registry package metadata.
  • If you don't trust HTTPS, set COREPACK_INTEGRITY_KEYS to {"npm":[{"expires":"2025-01-29T00:00:00.000Z","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","keytype":"ecdsa-sha2-nistp256","scheme":"ecdsa-sha2-nistp256","key":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1Olb3zMAFFxXKHiIkQO5cJ3Yhl5i6UPp+IhuteBJbuHcA5UogKo0EWtlWwW6KSaKoTNEYL7JlCQiVnkhBktUgg=="},{"expires":null,"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","keytype":"ecdsa-sha2-nistp256","scheme":"ecdsa-sha2-nistp256","key":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEY6Ya7W++7aUPzvMTrezH6Ycx3c+HOKYCcNGybJZSCJq/fd7Qa8uuAKtdIkUQtQiEKERhAmE5lMMJhP8OkDOa2g=="}]}.

@aduh95 aduh95 marked this as a duplicate of #631 Feb 3, 2025
@aeharding
Copy link

npm install --global corepack@latest

ntsim added a commit to dfe-analytical-services/explore-education-statistics that referenced this issue Feb 3, 2025
ntsim added a commit to dfe-analytical-services/explore-education-statistics that referenced this issue Feb 3, 2025
@jonkoops
Copy link

jonkoops commented Feb 3, 2025

Perhaps it would be good to lock this thread to contributors? Any solutions to the problem as it exists now have already been added to this thread, and further comments just add noise that serves no purpose as long as Corepack is not upgraded in actively supported versions of Node.js.

@tskimmett
Copy link

tskimmett commented Feb 3, 2025

This might be a dumb question, but who screwed up here? Was this just a case of all of us not correctly configuring our CI pipelines and being vulnerable to some latent "behavior" of corepack/npm, or was something actively changed to "cause" this? I ask not to place blame, but to better understand what happened for future reference.

@MikeMcC399
Copy link
Contributor

@tskimmett

This might be a dumb question, but who screwed up here? Was this just a case of all of us not correctly configuring our CI pipelines and being vulnerable to some latent "behavior" of corepack/npm, or was something actively changed to "cause" this? I ask not to place blame, but to better understand what happened for future reference.

This was not caused by end-user error.

@nodejs nodejs locked as too heated and limited conversation to collaborators Feb 3, 2025
LaurentChardin referenced this issue in Koenkk/zigbee2mqtt.io Feb 10, 2025
soumame added a commit to TutoriaLLM/TutoriaLLM that referenced this issue Feb 17, 2025
* 🗃️ 🚧 💥 change to uuid-based session management system as preparation of v2.0.0

* 🚧 🗃️ 💥 Using nanoid instead of UUID for session management

* 🐛 Fix error handling in session creation by removing session data from IndexedDB

* 🗑️ Remove CodeInput component and its dependencies from the project

* 🐛 Fix middleware to await next() for proper request handling

* 🛂 🚧 Implementing better-auth  for auth / add auth for users / support anonymous(guest) login  / set up pnpm catalogs

* 📦 Update hono dependency to use catalog reference in package.json

* 🚑 🐛 Fix type extraction for OpenAPI response content in jsonBody

* 🚧 ✨ Implementing better-auth system

* 🐛 Fix import path for Input component and adjust max-width in EditPassword component

* ✨ Add admin access button and styling for admin users in UserAccount component

* 🛂 🚧 Better-auth user lists for admin

* 🐛 Fix sign-out functionality to use authClient and redirect to login

* ✨ Add role selection for users in admin table with role change functionality

* 🚧 🏗️ ✨ Session viewer with user information

* 🚧 ✨ Implement user / user setting and enhance Popup component usage across various components

* 🔥 ✨ Refactor CreateFromAnonymous component to remove session prop and update BlockHighlight event handling

* 🚧 Add Session viewer by users / using path-based functions with tanstack instead of popup feature

* ✨ Enhance session management by adding user info navigation and improving back navigation functionality

* ✨ Improve session user info handling and add stats popup functionality in session tables

* ✨ Add user editing functionality and improve navigation with breadcrumbs in user and tutorial routes

* ✨ Add toast notifications for user and session actions in admin features

* 🐛 ✨ change avatar name assignment in UserCard component

* 🚑 Add functionality to delete all sessions by user ID in admin session management to avoid db relations error

* ✨ Remove unnecessary query invalidation and ensure toast notification displays correctly in user column actions

* 💄 ✨ Improve layout and padding in admin routes for better user experience

* 🚧 Tutorial Editor with Tanstack

* 🚧 🎨 💄 Building new design system with tailwind/shadcn

* 🐛 ✨ Add custom tag management with API integration in TutorialEditor

* 🔧 ✨ Update dependencies for better performance and security

* ➕ 🚧 🔧 Update zod to version 3.24.1 and adjust package references in pnpm workspace to prevent error for react-hook-form

* 🔥 🔧 Refactor frontend to simplify error handling and remove unused code to avoid tsc error

* 🔥 🔧 ✨ Refactor ExampleCode component to simplify session management and improve toolbox functionality / implement Blockly editor in tutorial editor

* 🔧 ✨ Remove unused loading spinner styles and simplify viewport meta tag in index.html

* 💄 ✨ Refactor components for improved styling and accessibility; remove unused overlay and popup components #80

* ✨ Add toast notifications for user info and password updates; integrate Toaster component in root and remove redundant Toaster from admin route

* 💄 ✨ Refactor button variants for consistency and improve UI components across the application

* 💄 ✨ Update highlight animation duration for improved visual effect in Blockly styles

* 💄 ✨ Refactor language selection to use custom Select component for improved consistency and styling

* 💄 ✨ Add warning color and foreground variables to Tailwind configuration for enhanced styling options

* 🚧 💄 ✨ Update UI components with new color schemes based on custom CSS and styling adjustments for improved consistency and aesthetics

* 🚧 💄 ✨ Update styling of text for improved consistency across components and enhance visual elements

* ⚡️ 💄 ✨ Refactor admin layout components for improved structure and styling consistency

* 🚧 Update maximum file size for caching in Workbox configuration to improve performance

* 🚧 Update docker-compose to use environment variables for backend URL configuration

* 🚑 🚧 Update TypeScript compilation command and blockly dependency version in package.json files

* 🚧 update dependency with catalog (pnpm)

* 🐛 🔧 Rename joinCode to joinSessionId to follow the changes in backend

* ➕ 🚧 🚀 Add Playwright accessibility tests and update .gitignore for frontend

* 🚧 Update VSCode settings for i18n ally configuration and enable TypeScript project diagnostics

* 🐛 Update name and paths for i18n config

* 🚧 🌐 🐛 i18n: Updating text for all components to use translation keys with i18n (machine-translated) machine-translated i18n #92

* 🌐 🚧  Replace alert with toast notifications for error handling in various components and update translations / machine-translated i18n #92 / Replacing alert by toast component #91

* 🚧 🌐 i18n: Clean up unused translation keys / machine-translated i18n #92

* 💄 🌐 🚧 Refactor toast notifications to use ErrorToastContent and SuccessToastContent components for consistent error handling across various components

* 🔥 🚧 🌐 i18n: Delete machine-translated languages / machine-translated i18n #92

* 🌐 Update i18n for zod validator in form

* ♻️ Add getUserSessions API and related hooks for user session management instead of local session storage

* 🌐 Update quick reply translations in English and Japanese

* 🎨 💄 Improve dialog component styles for better layout and responsiveness / Fix tutorial selector's ui #88

* 🚚 🔄 Rename logout function to signout for consistency in user account component

* 🌐 Update Japanese translations for login and account management terms

* 🔧 Fix tutorial tags display in admin table by mapping tag names

* 🔥 🎨 Remove join code references from editor tour and navbar components

* 🎉 ✨ Add session name functionality with database migration and API updates and add context to tanstack router for usequery client

* 💄 🔧 Increase z-index of ToastViewport for improved stacking context

* 🚑 Add 'name' field to initial data in ExampleCode component

* 🔥 🎨 Remove session data handling functions from IndexedDB and clean up Navbar component

* 🌐 🔧 Update session i18n translations

* ✨ Improve session display by adding session name and loading state handling

* ✨ Add project name column to session tables and update translations

* ✨ Fix translation rendering in SessionTable component

* 🚑 ✨ Refactor route handling of tutorials / users path and breadCrumbs component

* 🚚 ✨ Refactor import of useMutation to use custom hook

* 🐛 ✨ Add user creating page in admin console, fix camel case typo of confirmPassword field

* 💄 ✨ Update TutorialEditor layout for improved responsiveness and remove unnecessary margin in toolbar

* 💄 ✨ Update button variants in ExecSwitch and Navbar components from 'ghost' to 'outline'

* 💄 ✨ Update ExecSwitch and Navbar components for improved layout and responsiveness

* 🐛 ✨ Remove unused state variables from state management

* 🎨 🔥 Remove isCodeRunning atom and use useState instead / Avoid using useAtom for workspace state #85

* 🎨 🔥 Remove isWorkspaceConnected atom and use useState instead / Avoid using useAtom for workspace state #85

* 🔥 Remove unused sessionValue structure from handleExit function in Navbar component

* 🎨 🔥 Remove socketIoInstance atom and use useState instead / Avoid using useAtom for workspace state #85

* ➕ 🌐 ⚡️  Using cookie-based i18n setup instead of globalstate with jotai / Avoid using useAtom for workspace state #85

* 🎨 🔥 Replacing currentSession and prevSession atom by useState / Avoid using useAtom for workspace state #85

* 💄 🎨 🔧 Update button styles for improved appearance and consistency

* 💄 🎨 ✨ Update button styles to prevent text overflow and improve layout

* 🎨 🔧 Update Switch component to use flex-shrink for better layout handling

* 💄 🎨 Update session overlay layout for improved alignment and spacing

* 💄 🎨 Update layout and styling for improved responsiveness and alignment in profile and login components

* ⬆️ Update packages and delete old pnpm lock file

* 🔧 Update TypeScript configuration to enable JSX import source and exclude node_modules and dist

* 🔧 Fix type extraction for OpenAPI responses to allow unknown content type

* ⬆️ 🔧 Add react-scan package and enable scanning in development mode

* 🔧 Remove experimental project diagnostics setting from VSCode configuration

* ⚡️ 🚧 Implementing new Blockly component strategy

Co-authored-by: Yuta Kobayashi <[email protected]>

* 🔧 Update ExampleCode component to manage workspace session state and integrate language support

* 🔥 delete unused file

* 🧪 Configure Vitest with React and JSDOM for testing

* 🧹 Clean up unused imports and variables #96

* 🔒️  Enable cross-subdomain cookies for authentication

* 🔒️ Configure secure cross-origin cookie settings

* 🔒️ Remove explicit secure cookie settings

* 🔥 Remove debug console logs in Blockly component

* 🚧 ✨ Conditionally render workspace content based on connection status #100

* 🎨  Improve audio recording UI and functionality in dialogue component #99

* 🚀 Increase code execution memory limits in default configuration

* 🚑 🔒 Add HTTPS check for audio recording button visibility

* 💄 ✨ Enhance saved sessions UI with improved layout and empty state handling #86

* 🐛 ✨ Improve session exit handling with query invalidation

* 💄 Replace min-h-screen with min-h-svh for better viewport height handling

* 💄 ✨ Add login button submission state handling

* docs(readme): image and youtube link

* docs: open collective link

* fix

* docs(llm): editor instructions

* 💄 Add whitespace-nowrap to form label

* 📝 ✨ Replace Swagger UI with Scalar API Reference and enhance OpenAPI documentation with suppoting auth API(better-auth)

* 🚧 Error handling of better-auth

* ♻️ Refactor login screen: suppoting error messages with full translation from better-auth, replacing form with component

* ⚡️ 🔧 Configure OpenAPI plugin with default reference disabled

* ♻️ Refactor sessionlist api for admin to reduce loading time in table #107

* 🐛 Fix type error from tsc on sessionlist api #107

* 🔧 Configure TypeScript to improve error reporting

* 🚧 🚑 ✨ Implement query invalidation for admin tables after delete operations #103

* 🔧 Adjust session query stale time to always fetch latest data

* 🔧 Replace useRouteContext with useQueryClient for consistent query management #103

* 🔧 Update better-auth package version to 1.1.15

* 🧹 Remove unused / broken import statements across multiple frontend components

* 🔧 Disable sorting for action and stats columns in admin tables #87

* ✅ Add e2e tests for guest authentication flow

* feat: install renovate

* chore: save-exact

* Renovate Updates

* refactor: add route comment (#111)

* fix: spell  (#112)

* wip: spell check

* fix: spell

* 🔧 update dev dependencies in package.json and add js-yaml from pnpm catalog

* 🚨 update cspell word list and add British English language settings

* 🚨 rename serializednodes to serializedNodes across project

* 🔧 Add 'sessionvalue' to cspell ignore word list

* 🚨 Rename 'isuser' to 'isUser' across project

* 💄 Fix spelling of 'dialogue' in system templates

* 🔧 Fix variable naming in session updator

* 🔧 Ignore Playwright report directories in cspell config

* 🚨 Rename 'nodetype' to 'nodeType'

* 🚨 Fix LangPicker import casing

* 🚨 Fix 'easymode' variable naming to 'easyMode'

* 🚨 Fix typo in warning text classes

* 🚨 Fix 'beforeinstallprompt' event name casing

* 🚨 Fix 'typecodeMsg' to 'typeCodeMsg' in translation files

* 🚨 Rename 'Customnode' to 'CustomNode' in TutorialEditor

* 🚨 Fix 'laston...' cookie naming to 'lastOn...'

* 🚨 Fix 'debuginfo' to 'debugInfo' in translation and import files

* 🚨 Fix 'pixeldensity' to 'pixelDensity' in workspaceToPng

* 🚨 Fix 'typesafety' to 'type safety' in comment

* 🚨 Update cspell ignore paths for extensions package

* 🚨 Fix 'quickreply' to 'quickReply' in import path

* 🚨 Remove empty 'logbuffer' translation key

* 🚨 Update cspell ignore paths for artifacts and docker-compose

* 🚨 Rename 'serializednodes' to 'serializedNodes' in tutorials table(migration from drizzle)

---------

Co-authored-by: soumame <[email protected]>

* Fix/pre commit (#117)

* 💚 update pre-commit hooks and package scripts for type checking

* chore(package.json): implementing commit formatter (commitlint / commitzen)

* fix: rename nodeType import to correct casing (#118)

* fix: rename nodeType import to correct casing

* fix: correct debugInfo import casing

* fix: correct LangPicker import casing

* chore: remove unnecessary TypeScript compilation in build script

* feat: add LangPicker and QuickReply components to frontend

* chore: move docs repo (#113)

* chore: move docs repo

* chore: remove unnecessary daily webhook workflow

* fix: update docs project configuration and formatting

* chore: update docs project version to 2.0.0

* chore: add Astro Tailwind integration

* refactor: migrate Contributers component to Tailwind CSS

* chore: remove DemoStatus component from docs pages

* feat: refactor OpenAPI documentation for exporting schema

* fix: updating frontend's package.json

* refactor: simplify OpenAPI documentation routes by loading URL from .env and remove api-schema.yaml

* refactor: simplify OpenAPI documentation routes by loading URL from .env and remove api-schema.yaml

Integrate docs into monorepo #109

* docs: add Japanese README and update language link

---------

Co-authored-by: soumame <[email protected]>

* fix: skip corepack signature verification (#119)

Resolves nodejs/corepack#612 temporality

* chore: wireit monorepo (#122)

* chore: wireit monorepo

* fix: type check

* fix: files

* chore: remove extensions type check from wireit configuration

---------

Co-authored-by: soumame <[email protected]>

* Vitest-setup (#123)

* 🚧 🧪 Add Vitest configuration and component tests for frontend (seems not working on vscode's extension)

* chore: update testing library dependencies in package.json

* test: add comprehensive tests for ExecSwitch and Navbar components

* fix: update letter case to resolve build error

* refactor: implement dependency injection middleware and update context types

Co-authored-by: Yuta Kobayashi <[email protected]>

* chore: export default app from backend index

* chore: add testcontainers as a dev dependency for backend testing

* chore: add Vitest configuration for backend testing

* test: add database and tutorial module tests with test helpers

* test(vitest configurations): implement backend testing

- Add .env.test file for backend testing- Modify Vitest configs to load test environment variables-
Update database utility functions to use new environment variable names- Adjust database setup and
truncate functions for testing

* refactor: update dependency injection middleware to accept database parameter

* test: add comprehensive tests for tutorial routes and endpoints

* refactor: simplify dependency injection middleware and remove explicit database parameter

* test: update session handling of backend testing with improved setup

Co-authored-by: Yuta Kobayashi <[email protected]>

* test: remove navbar component tests

* refactor: reorganize route handling and enforce session validation middleware

* docs: add server URL configuration to auth reference in OpenAPI specification

* refactor: remove session renaming functionality and simplify session update logic

* test: enhance session tests with structured operations and improved setup

* refactor: streamline route handling and reintroduce session validation middleware

* feat: add middleware for dependency injection and session management

* refactor: remove unused socket.io middleware from session module

* refactor: update import path for dependency injection middleware

* feat: add authentication middleware for session routes

* refactor: remove unnecessary console logging statements

* docs: add comprehensive testing guidelines for backend development

* test: add health check endpoint test for backend status route

* test: add comprehensive test suite for admin session management and fix unsuitable db query

* test: modify database truncate method to reset identity sequence

* test: add comprehensive test suite for admin tutorial management

* test: enhance tutorial test assertions with specific expected values

* Merge branch 'dev' into vitest-setup

* test: remove unnecessary tutorial test assertions

* test: setup MSW and enhance frontend testing infrastructure

---------

Co-authored-by: Yuta Kobayashi <[email protected]>

* chore: remove unused reset-credential command from docker-compose startup script

* feat: add CLI commands for user registration and initialization

* chore: update GitHub Actions deployment workflows (#125)

- Add environment configurations for dev and production deployments
- Remove explicit release names in GitHub release creation steps

* fix: update GitHub actions to refer OPENAPI_DOCS_URL for build /docs repo (#126)

* fix: add OPENAPI_DOCS_URL build argument for Docker and GitHub Actions (#127)

- Update Dockerfile and Dockerfile.dev to include OPENAPI_DOCS_URL build argument
- Modify GitHub Actions workflows (deploy.yaml and dev_deploy.yaml) to pass OPENAPI_DOCS_URL
- Add .env.example in docs package with default OpenAPI documentation URL

* Deploy workflow fix 4 (#129)

* chore: remove OPENAPI_DOCS_URL references from Docker and GitHub Actions

- Remove OPENAPI_DOCS_URL environment variable and build arguments from Dockerfiles
- Update GitHub Actions workflows to remove OPENAPI_DOCS_URL configuration
- Delete .env.example file in docs package

* chore: restore .env.example with OPENAPI_DOCS_URL for docs package

---------

Co-authored-by: Yuta Kobayashi <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
soumame added a commit to TutoriaLLM/TutoriaLLM that referenced this issue Feb 18, 2025
* 🗃️ 🚧 💥 change to uuid-based session management system as preparation of v2.0.0

* 🚧 🗃️ 💥 Using nanoid instead of UUID for session management

* 🐛 Fix error handling in session creation by removing session data from IndexedDB

* 🗑️ Remove CodeInput component and its dependencies from the project

* 🐛 Fix middleware to await next() for proper request handling

* 🛂 🚧 Implementing better-auth  for auth / add auth for users / support anonymous(guest) login  / set up pnpm catalogs

* 📦 Update hono dependency to use catalog reference in package.json

* 🚑 🐛 Fix type extraction for OpenAPI response content in jsonBody

* 🚧 ✨ Implementing better-auth system

* 🐛 Fix import path for Input component and adjust max-width in EditPassword component

* ✨ Add admin access button and styling for admin users in UserAccount component

* 🛂 🚧 Better-auth user lists for admin

* 🐛 Fix sign-out functionality to use authClient and redirect to login

* ✨ Add role selection for users in admin table with role change functionality

* 🚧 🏗️ ✨ Session viewer with user information

* 🚧 ✨ Implement user / user setting and enhance Popup component usage across various components

* 🔥 ✨ Refactor CreateFromAnonymous component to remove session prop and update BlockHighlight event handling

* 🚧 Add Session viewer by users / using path-based functions with tanstack instead of popup feature

* ✨ Enhance session management by adding user info navigation and improving back navigation functionality

* ✨ Improve session user info handling and add stats popup functionality in session tables

* ✨ Add user editing functionality and improve navigation with breadcrumbs in user and tutorial routes

* ✨ Add toast notifications for user and session actions in admin features

* 🐛 ✨ change avatar name assignment in UserCard component

* 🚑 Add functionality to delete all sessions by user ID in admin session management to avoid db relations error

* ✨ Remove unnecessary query invalidation and ensure toast notification displays correctly in user column actions

* 💄 ✨ Improve layout and padding in admin routes for better user experience

* 🚧 Tutorial Editor with Tanstack

* 🚧 🎨 💄 Building new design system with tailwind/shadcn

* 🐛 ✨ Add custom tag management with API integration in TutorialEditor

* 🔧 ✨ Update dependencies for better performance and security

* ➕ 🚧 🔧 Update zod to version 3.24.1 and adjust package references in pnpm workspace to prevent error for react-hook-form

* 🔥 🔧 Refactor frontend to simplify error handling and remove unused code to avoid tsc error

* 🔥 🔧 ✨ Refactor ExampleCode component to simplify session management and improve toolbox functionality / implement Blockly editor in tutorial editor

* 🔧 ✨ Remove unused loading spinner styles and simplify viewport meta tag in index.html

* 💄 ✨ Refactor components for improved styling and accessibility; remove unused overlay and popup components #80

* ✨ Add toast notifications for user info and password updates; integrate Toaster component in root and remove redundant Toaster from admin route

* 💄 ✨ Refactor button variants for consistency and improve UI components across the application

* 💄 ✨ Update highlight animation duration for improved visual effect in Blockly styles

* 💄 ✨ Refactor language selection to use custom Select component for improved consistency and styling

* 💄 ✨ Add warning color and foreground variables to Tailwind configuration for enhanced styling options

* 🚧 💄 ✨ Update UI components with new color schemes based on custom CSS and styling adjustments for improved consistency and aesthetics

* 🚧 💄 ✨ Update styling of text for improved consistency across components and enhance visual elements

* ⚡️ 💄 ✨ Refactor admin layout components for improved structure and styling consistency

* 🚧 Update maximum file size for caching in Workbox configuration to improve performance

* 🚧 Update docker-compose to use environment variables for backend URL configuration

* 🚑 🚧 Update TypeScript compilation command and blockly dependency version in package.json files

* 🚧 update dependency with catalog (pnpm)

* 🐛 🔧 Rename joinCode to joinSessionId to follow the changes in backend

* ➕ 🚧 🚀 Add Playwright accessibility tests and update .gitignore for frontend

* 🚧 Update VSCode settings for i18n ally configuration and enable TypeScript project diagnostics

* 🐛 Update name and paths for i18n config

* 🚧 🌐 🐛 i18n: Updating text for all components to use translation keys with i18n (machine-translated) machine-translated i18n #92

* 🌐 🚧  Replace alert with toast notifications for error handling in various components and update translations / machine-translated i18n #92 / Replacing alert by toast component #91

* 🚧 🌐 i18n: Clean up unused translation keys / machine-translated i18n #92

* 💄 🌐 🚧 Refactor toast notifications to use ErrorToastContent and SuccessToastContent components for consistent error handling across various components

* 🔥 🚧 🌐 i18n: Delete machine-translated languages / machine-translated i18n #92

* 🌐 Update i18n for zod validator in form

* ♻️ Add getUserSessions API and related hooks for user session management instead of local session storage

* 🌐 Update quick reply translations in English and Japanese

* 🎨 💄 Improve dialog component styles for better layout and responsiveness / Fix tutorial selector's ui #88

* 🚚 🔄 Rename logout function to signout for consistency in user account component

* 🌐 Update Japanese translations for login and account management terms

* 🔧 Fix tutorial tags display in admin table by mapping tag names

* 🔥 🎨 Remove join code references from editor tour and navbar components

* 🎉 ✨ Add session name functionality with database migration and API updates and add context to tanstack router for usequery client

* 💄 🔧 Increase z-index of ToastViewport for improved stacking context

* 🚑 Add 'name' field to initial data in ExampleCode component

* 🔥 🎨 Remove session data handling functions from IndexedDB and clean up Navbar component

* 🌐 🔧 Update session i18n translations

* ✨ Improve session display by adding session name and loading state handling

* ✨ Add project name column to session tables and update translations

* ✨ Fix translation rendering in SessionTable component

* 🚑 ✨ Refactor route handling of tutorials / users path and breadCrumbs component

* 🚚 ✨ Refactor import of useMutation to use custom hook

* 🐛 ✨ Add user creating page in admin console, fix camel case typo of confirmPassword field

* 💄 ✨ Update TutorialEditor layout for improved responsiveness and remove unnecessary margin in toolbar

* 💄 ✨ Update button variants in ExecSwitch and Navbar components from 'ghost' to 'outline'

* 💄 ✨ Update ExecSwitch and Navbar components for improved layout and responsiveness

* 🐛 ✨ Remove unused state variables from state management

* 🎨 🔥 Remove isCodeRunning atom and use useState instead / Avoid using useAtom for workspace state #85

* 🎨 🔥 Remove isWorkspaceConnected atom and use useState instead / Avoid using useAtom for workspace state #85

* 🔥 Remove unused sessionValue structure from handleExit function in Navbar component

* 🎨 🔥 Remove socketIoInstance atom and use useState instead / Avoid using useAtom for workspace state #85

* ➕ 🌐 ⚡️  Using cookie-based i18n setup instead of globalstate with jotai / Avoid using useAtom for workspace state #85

* 🎨 🔥 Replacing currentSession and prevSession atom by useState / Avoid using useAtom for workspace state #85

* 💄 🎨 🔧 Update button styles for improved appearance and consistency

* 💄 🎨 ✨ Update button styles to prevent text overflow and improve layout

* 🎨 🔧 Update Switch component to use flex-shrink for better layout handling

* 💄 🎨 Update session overlay layout for improved alignment and spacing

* 💄 🎨 Update layout and styling for improved responsiveness and alignment in profile and login components

* ⬆️ Update packages and delete old pnpm lock file

* 🔧 Update TypeScript configuration to enable JSX import source and exclude node_modules and dist

* 🔧 Fix type extraction for OpenAPI responses to allow unknown content type

* ⬆️ 🔧 Add react-scan package and enable scanning in development mode

* 🔧 Remove experimental project diagnostics setting from VSCode configuration

* ⚡️ 🚧 Implementing new Blockly component strategy

Co-authored-by: Yuta Kobayashi <[email protected]>

* 🔧 Update ExampleCode component to manage workspace session state and integrate language support

* 🔥 delete unused file

* 🧪 Configure Vitest with React and JSDOM for testing

* 🧹 Clean up unused imports and variables #96

* 🔒️  Enable cross-subdomain cookies for authentication

* 🔒️ Configure secure cross-origin cookie settings

* 🔒️ Remove explicit secure cookie settings

* 🔥 Remove debug console logs in Blockly component

* 🚧 ✨ Conditionally render workspace content based on connection status #100

* 🎨  Improve audio recording UI and functionality in dialogue component #99

* 🚀 Increase code execution memory limits in default configuration

* 🚑 🔒 Add HTTPS check for audio recording button visibility

* 💄 ✨ Enhance saved sessions UI with improved layout and empty state handling #86

* 🐛 ✨ Improve session exit handling with query invalidation

* 💄 Replace min-h-screen with min-h-svh for better viewport height handling

* 💄 ✨ Add login button submission state handling

* docs(readme): image and youtube link

* docs: open collective link

* fix

* docs(llm): editor instructions

* 💄 Add whitespace-nowrap to form label

* 📝 ✨ Replace Swagger UI with Scalar API Reference and enhance OpenAPI documentation with suppoting auth API(better-auth)

* 🚧 Error handling of better-auth

* ♻️ Refactor login screen: suppoting error messages with full translation from better-auth, replacing form with component

* ⚡️ 🔧 Configure OpenAPI plugin with default reference disabled

* ♻️ Refactor sessionlist api for admin to reduce loading time in table #107

* 🐛 Fix type error from tsc on sessionlist api #107

* 🔧 Configure TypeScript to improve error reporting

* 🚧 🚑 ✨ Implement query invalidation for admin tables after delete operations #103

* 🔧 Adjust session query stale time to always fetch latest data

* 🔧 Replace useRouteContext with useQueryClient for consistent query management #103

* 🔧 Update better-auth package version to 1.1.15

* 🧹 Remove unused / broken import statements across multiple frontend components

* 🔧 Disable sorting for action and stats columns in admin tables #87

* ✅ Add e2e tests for guest authentication flow

* feat: install renovate

* chore: save-exact

* Renovate Updates

* refactor: add route comment (#111)

* fix: spell  (#112)

* wip: spell check

* fix: spell

* 🔧 update dev dependencies in package.json and add js-yaml from pnpm catalog

* 🚨 update cspell word list and add British English language settings

* 🚨 rename serializednodes to serializedNodes across project

* 🔧 Add 'sessionvalue' to cspell ignore word list

* 🚨 Rename 'isuser' to 'isUser' across project

* 💄 Fix spelling of 'dialogue' in system templates

* 🔧 Fix variable naming in session updator

* 🔧 Ignore Playwright report directories in cspell config

* 🚨 Rename 'nodetype' to 'nodeType'

* 🚨 Fix LangPicker import casing

* 🚨 Fix 'easymode' variable naming to 'easyMode'

* 🚨 Fix typo in warning text classes

* 🚨 Fix 'beforeinstallprompt' event name casing

* 🚨 Fix 'typecodeMsg' to 'typeCodeMsg' in translation files

* 🚨 Rename 'Customnode' to 'CustomNode' in TutorialEditor

* 🚨 Fix 'laston...' cookie naming to 'lastOn...'

* 🚨 Fix 'debuginfo' to 'debugInfo' in translation and import files

* 🚨 Fix 'pixeldensity' to 'pixelDensity' in workspaceToPng

* 🚨 Fix 'typesafety' to 'type safety' in comment

* 🚨 Update cspell ignore paths for extensions package

* 🚨 Fix 'quickreply' to 'quickReply' in import path

* 🚨 Remove empty 'logbuffer' translation key

* 🚨 Update cspell ignore paths for artifacts and docker-compose

* 🚨 Rename 'serializednodes' to 'serializedNodes' in tutorials table(migration from drizzle)

---------

Co-authored-by: soumame <[email protected]>

* Fix/pre commit (#117)

* 💚 update pre-commit hooks and package scripts for type checking

* chore(package.json): implementing commit formatter (commitlint / commitzen)

* fix: rename nodeType import to correct casing (#118)

* fix: rename nodeType import to correct casing

* fix: correct debugInfo import casing

* fix: correct LangPicker import casing

* chore: remove unnecessary TypeScript compilation in build script

* feat: add LangPicker and QuickReply components to frontend

* chore: move docs repo (#113)

* chore: move docs repo

* chore: remove unnecessary daily webhook workflow

* fix: update docs project configuration and formatting

* chore: update docs project version to 2.0.0

* chore: add Astro Tailwind integration

* refactor: migrate Contributers component to Tailwind CSS

* chore: remove DemoStatus component from docs pages

* feat: refactor OpenAPI documentation for exporting schema

* fix: updating frontend's package.json

* refactor: simplify OpenAPI documentation routes by loading URL from .env and remove api-schema.yaml

* refactor: simplify OpenAPI documentation routes by loading URL from .env and remove api-schema.yaml

Integrate docs into monorepo #109

* docs: add Japanese README and update language link

---------

Co-authored-by: soumame <[email protected]>

* fix: skip corepack signature verification (#119)

Resolves nodejs/corepack#612 temporality

* chore: wireit monorepo (#122)

* chore: wireit monorepo

* fix: type check

* fix: files

* chore: remove extensions type check from wireit configuration

---------

Co-authored-by: soumame <[email protected]>

* Vitest-setup (#123)

* 🚧 🧪 Add Vitest configuration and component tests for frontend (seems not working on vscode's extension)

* chore: update testing library dependencies in package.json

* test: add comprehensive tests for ExecSwitch and Navbar components

* fix: update letter case to resolve build error

* refactor: implement dependency injection middleware and update context types

Co-authored-by: Yuta Kobayashi <[email protected]>

* chore: export default app from backend index

* chore: add testcontainers as a dev dependency for backend testing

* chore: add Vitest configuration for backend testing

* test: add database and tutorial module tests with test helpers

* test(vitest configurations): implement backend testing

- Add .env.test file for backend testing- Modify Vitest configs to load test environment variables-
Update database utility functions to use new environment variable names- Adjust database setup and
truncate functions for testing

* refactor: update dependency injection middleware to accept database parameter

* test: add comprehensive tests for tutorial routes and endpoints

* refactor: simplify dependency injection middleware and remove explicit database parameter

* test: update session handling of backend testing with improved setup

Co-authored-by: Yuta Kobayashi <[email protected]>

* test: remove navbar component tests

* refactor: reorganize route handling and enforce session validation middleware

* docs: add server URL configuration to auth reference in OpenAPI specification

* refactor: remove session renaming functionality and simplify session update logic

* test: enhance session tests with structured operations and improved setup

* refactor: streamline route handling and reintroduce session validation middleware

* feat: add middleware for dependency injection and session management

* refactor: remove unused socket.io middleware from session module

* refactor: update import path for dependency injection middleware

* feat: add authentication middleware for session routes

* refactor: remove unnecessary console logging statements

* docs: add comprehensive testing guidelines for backend development

* test: add health check endpoint test for backend status route

* test: add comprehensive test suite for admin session management and fix unsuitable db query

* test: modify database truncate method to reset identity sequence

* test: add comprehensive test suite for admin tutorial management

* test: enhance tutorial test assertions with specific expected values

* Merge branch 'dev' into vitest-setup

* test: remove unnecessary tutorial test assertions

* test: setup MSW and enhance frontend testing infrastructure

---------

Co-authored-by: Yuta Kobayashi <[email protected]>

* chore: remove unused reset-credential command from docker-compose startup script

* feat: add CLI commands for user registration and initialization

* chore: update GitHub Actions deployment workflows (#125)

- Add environment configurations for dev and production deployments
- Remove explicit release names in GitHub release creation steps

* fix: update GitHub actions to refer OPENAPI_DOCS_URL for build /docs repo (#126)

* fix: add OPENAPI_DOCS_URL build argument for Docker and GitHub Actions (#127)

- Update Dockerfile and Dockerfile.dev to include OPENAPI_DOCS_URL build argument
- Modify GitHub Actions workflows (deploy.yaml and dev_deploy.yaml) to pass OPENAPI_DOCS_URL
- Add .env.example in docs package with default OpenAPI documentation URL

* Deploy workflow fix 4 (#129)

* chore: remove OPENAPI_DOCS_URL references from Docker and GitHub Actions

- Remove OPENAPI_DOCS_URL environment variable and build arguments from Dockerfiles
- Update GitHub Actions workflows to remove OPENAPI_DOCS_URL configuration
- Delete .env.example file in docs package

* chore: restore .env.example with OPENAPI_DOCS_URL for docs package

* Renovate Updates (#115)

* Renovate Updates

* chore(deps): update dependency better-auth to v1.1.16 [security] (#130)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency vitest to v3.0.5 [security] (#133)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency @sentry/node to v8.49.0 [security] (#132)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency vite to v5.4.12 [security] (#131)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): pin node.js (#136)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): pin dependencies (#137)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: soumame <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Bugfix 2.0.1 (#144)

* chore: update project version to 2.0.1

* fix: make user creation CLI command await role setting

Unable to add "admin" role for created user from cli #134

* chore: remove server telemetry configuration file

* feat: add session-based WebSocket proxy upgrade handling

Implement WebSocket upgrade handling with session-based validation:
- Extract sessionId from the request URL
- Check if sessionId exists and has a corresponding proxy
- Return 404 if session is invalid
- Proceed with proxy upgrade for valid sessions

Server crashes when Minecraft has connected #135

* Revert "Bugfix 2.0.1 (#144)" (#149)

This reverts commit d96f9f7.

---------

Co-authored-by: Yuta Kobayashi <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
soumame added a commit to TutoriaLLM/TutoriaLLM that referenced this issue Feb 18, 2025
* 🗃️ 🚧 💥 change to uuid-based session management system as preparation of v2.0.0

* 🚧 🗃️ 💥 Using nanoid instead of UUID for session management

* 🐛 Fix error handling in session creation by removing session data from IndexedDB

* 🗑️ Remove CodeInput component and its dependencies from the project

* 🐛 Fix middleware to await next() for proper request handling

* 🛂 🚧 Implementing better-auth  for auth / add auth for users / support anonymous(guest) login  / set up pnpm catalogs

* 📦 Update hono dependency to use catalog reference in package.json

* 🚑 🐛 Fix type extraction for OpenAPI response content in jsonBody

* 🚧 ✨ Implementing better-auth system

* 🐛 Fix import path for Input component and adjust max-width in EditPassword component

* ✨ Add admin access button and styling for admin users in UserAccount component

* 🛂 🚧 Better-auth user lists for admin

* 🐛 Fix sign-out functionality to use authClient and redirect to login

* ✨ Add role selection for users in admin table with role change functionality

* 🚧 🏗️ ✨ Session viewer with user information

* 🚧 ✨ Implement user / user setting and enhance Popup component usage across various components

* 🔥 ✨ Refactor CreateFromAnonymous component to remove session prop and update BlockHighlight event handling

* 🚧 Add Session viewer by users / using path-based functions with tanstack instead of popup feature

* ✨ Enhance session management by adding user info navigation and improving back navigation functionality

* ✨ Improve session user info handling and add stats popup functionality in session tables

* ✨ Add user editing functionality and improve navigation with breadcrumbs in user and tutorial routes

* ✨ Add toast notifications for user and session actions in admin features

* 🐛 ✨ change avatar name assignment in UserCard component

* 🚑 Add functionality to delete all sessions by user ID in admin session management to avoid db relations error

* ✨ Remove unnecessary query invalidation and ensure toast notification displays correctly in user column actions

* 💄 ✨ Improve layout and padding in admin routes for better user experience

* 🚧 Tutorial Editor with Tanstack

* 🚧 🎨 💄 Building new design system with tailwind/shadcn

* 🐛 ✨ Add custom tag management with API integration in TutorialEditor

* 🔧 ✨ Update dependencies for better performance and security

* ➕ 🚧 🔧 Update zod to version 3.24.1 and adjust package references in pnpm workspace to prevent error for react-hook-form

* 🔥 🔧 Refactor frontend to simplify error handling and remove unused code to avoid tsc error

* 🔥 🔧 ✨ Refactor ExampleCode component to simplify session management and improve toolbox functionality / implement Blockly editor in tutorial editor

* 🔧 ✨ Remove unused loading spinner styles and simplify viewport meta tag in index.html

* 💄 ✨ Refactor components for improved styling and accessibility; remove unused overlay and popup components #80

* ✨ Add toast notifications for user info and password updates; integrate Toaster component in root and remove redundant Toaster from admin route

* 💄 ✨ Refactor button variants for consistency and improve UI components across the application

* 💄 ✨ Update highlight animation duration for improved visual effect in Blockly styles

* 💄 ✨ Refactor language selection to use custom Select component for improved consistency and styling

* 💄 ✨ Add warning color and foreground variables to Tailwind configuration for enhanced styling options

* 🚧 💄 ✨ Update UI components with new color schemes based on custom CSS and styling adjustments for improved consistency and aesthetics

* 🚧 💄 ✨ Update styling of text for improved consistency across components and enhance visual elements

* ⚡️ 💄 ✨ Refactor admin layout components for improved structure and styling consistency

* 🚧 Update maximum file size for caching in Workbox configuration to improve performance

* 🚧 Update docker-compose to use environment variables for backend URL configuration

* 🚑 🚧 Update TypeScript compilation command and blockly dependency version in package.json files

* 🚧 update dependency with catalog (pnpm)

* 🐛 🔧 Rename joinCode to joinSessionId to follow the changes in backend

* ➕ 🚧 🚀 Add Playwright accessibility tests and update .gitignore for frontend

* 🚧 Update VSCode settings for i18n ally configuration and enable TypeScript project diagnostics

* 🐛 Update name and paths for i18n config

* 🚧 🌐 🐛 i18n: Updating text for all components to use translation keys with i18n (machine-translated) machine-translated i18n #92

* 🌐 🚧  Replace alert with toast notifications for error handling in various components and update translations / machine-translated i18n #92 / Replacing alert by toast component #91

* 🚧 🌐 i18n: Clean up unused translation keys / machine-translated i18n #92

* 💄 🌐 🚧 Refactor toast notifications to use ErrorToastContent and SuccessToastContent components for consistent error handling across various components

* 🔥 🚧 🌐 i18n: Delete machine-translated languages / machine-translated i18n #92

* 🌐 Update i18n for zod validator in form

* ♻️ Add getUserSessions API and related hooks for user session management instead of local session storage

* 🌐 Update quick reply translations in English and Japanese

* 🎨 💄 Improve dialog component styles for better layout and responsiveness / Fix tutorial selector's ui #88

* 🚚 🔄 Rename logout function to signout for consistency in user account component

* 🌐 Update Japanese translations for login and account management terms

* 🔧 Fix tutorial tags display in admin table by mapping tag names

* 🔥 🎨 Remove join code references from editor tour and navbar components

* 🎉 ✨ Add session name functionality with database migration and API updates and add context to tanstack router for usequery client

* 💄 🔧 Increase z-index of ToastViewport for improved stacking context

* 🚑 Add 'name' field to initial data in ExampleCode component

* 🔥 🎨 Remove session data handling functions from IndexedDB and clean up Navbar component

* 🌐 🔧 Update session i18n translations

* ✨ Improve session display by adding session name and loading state handling

* ✨ Add project name column to session tables and update translations

* ✨ Fix translation rendering in SessionTable component

* 🚑 ✨ Refactor route handling of tutorials / users path and breadCrumbs component

* 🚚 ✨ Refactor import of useMutation to use custom hook

* 🐛 ✨ Add user creating page in admin console, fix camel case typo of confirmPassword field

* 💄 ✨ Update TutorialEditor layout for improved responsiveness and remove unnecessary margin in toolbar

* 💄 ✨ Update button variants in ExecSwitch and Navbar components from 'ghost' to 'outline'

* 💄 ✨ Update ExecSwitch and Navbar components for improved layout and responsiveness

* 🐛 ✨ Remove unused state variables from state management

* 🎨 🔥 Remove isCodeRunning atom and use useState instead / Avoid using useAtom for workspace state #85

* 🎨 🔥 Remove isWorkspaceConnected atom and use useState instead / Avoid using useAtom for workspace state #85

* 🔥 Remove unused sessionValue structure from handleExit function in Navbar component

* 🎨 🔥 Remove socketIoInstance atom and use useState instead / Avoid using useAtom for workspace state #85

* ➕ 🌐 ⚡️  Using cookie-based i18n setup instead of globalstate with jotai / Avoid using useAtom for workspace state #85

* 🎨 🔥 Replacing currentSession and prevSession atom by useState / Avoid using useAtom for workspace state #85

* 💄 🎨 🔧 Update button styles for improved appearance and consistency

* 💄 🎨 ✨ Update button styles to prevent text overflow and improve layout

* 🎨 🔧 Update Switch component to use flex-shrink for better layout handling

* 💄 🎨 Update session overlay layout for improved alignment and spacing

* 💄 🎨 Update layout and styling for improved responsiveness and alignment in profile and login components

* ⬆️ Update packages and delete old pnpm lock file

* 🔧 Update TypeScript configuration to enable JSX import source and exclude node_modules and dist

* 🔧 Fix type extraction for OpenAPI responses to allow unknown content type

* ⬆️ 🔧 Add react-scan package and enable scanning in development mode

* 🔧 Remove experimental project diagnostics setting from VSCode configuration

* ⚡️ 🚧 Implementing new Blockly component strategy

Co-authored-by: Yuta Kobayashi <[email protected]>

* 🔧 Update ExampleCode component to manage workspace session state and integrate language support

* 🔥 delete unused file

* 🧪 Configure Vitest with React and JSDOM for testing

* 🧹 Clean up unused imports and variables #96

* 🔒️  Enable cross-subdomain cookies for authentication

* 🔒️ Configure secure cross-origin cookie settings

* 🔒️ Remove explicit secure cookie settings

* 🔥 Remove debug console logs in Blockly component

* 🚧 ✨ Conditionally render workspace content based on connection status #100

* 🎨  Improve audio recording UI and functionality in dialogue component #99

* 🚀 Increase code execution memory limits in default configuration

* 🚑 🔒 Add HTTPS check for audio recording button visibility

* 💄 ✨ Enhance saved sessions UI with improved layout and empty state handling #86

* 🐛 ✨ Improve session exit handling with query invalidation

* 💄 Replace min-h-screen with min-h-svh for better viewport height handling

* 💄 ✨ Add login button submission state handling

* docs(readme): image and youtube link

* docs: open collective link

* fix

* docs(llm): editor instructions

* 💄 Add whitespace-nowrap to form label

* 📝 ✨ Replace Swagger UI with Scalar API Reference and enhance OpenAPI documentation with suppoting auth API(better-auth)

* 🚧 Error handling of better-auth

* ♻️ Refactor login screen: suppoting error messages with full translation from better-auth, replacing form with component

* ⚡️ 🔧 Configure OpenAPI plugin with default reference disabled

* ♻️ Refactor sessionlist api for admin to reduce loading time in table #107

* 🐛 Fix type error from tsc on sessionlist api #107

* 🔧 Configure TypeScript to improve error reporting

* 🚧 🚑 ✨ Implement query invalidation for admin tables after delete operations #103

* 🔧 Adjust session query stale time to always fetch latest data

* 🔧 Replace useRouteContext with useQueryClient for consistent query management #103

* 🔧 Update better-auth package version to 1.1.15

* 🧹 Remove unused / broken import statements across multiple frontend components

* 🔧 Disable sorting for action and stats columns in admin tables #87

* ✅ Add e2e tests for guest authentication flow

* feat: install renovate

* chore: save-exact

* Renovate Updates

* refactor: add route comment (#111)

* fix: spell  (#112)

* wip: spell check

* fix: spell

* 🔧 update dev dependencies in package.json and add js-yaml from pnpm catalog

* 🚨 update cspell word list and add British English language settings

* 🚨 rename serializednodes to serializedNodes across project

* 🔧 Add 'sessionvalue' to cspell ignore word list

* 🚨 Rename 'isuser' to 'isUser' across project

* 💄 Fix spelling of 'dialogue' in system templates

* 🔧 Fix variable naming in session updator

* 🔧 Ignore Playwright report directories in cspell config

* 🚨 Rename 'nodetype' to 'nodeType'

* 🚨 Fix LangPicker import casing

* 🚨 Fix 'easymode' variable naming to 'easyMode'

* 🚨 Fix typo in warning text classes

* 🚨 Fix 'beforeinstallprompt' event name casing

* 🚨 Fix 'typecodeMsg' to 'typeCodeMsg' in translation files

* 🚨 Rename 'Customnode' to 'CustomNode' in TutorialEditor

* 🚨 Fix 'laston...' cookie naming to 'lastOn...'

* 🚨 Fix 'debuginfo' to 'debugInfo' in translation and import files

* 🚨 Fix 'pixeldensity' to 'pixelDensity' in workspaceToPng

* 🚨 Fix 'typesafety' to 'type safety' in comment

* 🚨 Update cspell ignore paths for extensions package

* 🚨 Fix 'quickreply' to 'quickReply' in import path

* 🚨 Remove empty 'logbuffer' translation key

* 🚨 Update cspell ignore paths for artifacts and docker-compose

* 🚨 Rename 'serializednodes' to 'serializedNodes' in tutorials table(migration from drizzle)

---------

Co-authored-by: soumame <[email protected]>

* Fix/pre commit (#117)

* 💚 update pre-commit hooks and package scripts for type checking

* chore(package.json): implementing commit formatter (commitlint / commitzen)

* fix: rename nodeType import to correct casing (#118)

* fix: rename nodeType import to correct casing

* fix: correct debugInfo import casing

* fix: correct LangPicker import casing

* chore: remove unnecessary TypeScript compilation in build script

* feat: add LangPicker and QuickReply components to frontend

* chore: move docs repo (#113)

* chore: move docs repo

* chore: remove unnecessary daily webhook workflow

* fix: update docs project configuration and formatting

* chore: update docs project version to 2.0.0

* chore: add Astro Tailwind integration

* refactor: migrate Contributers component to Tailwind CSS

* chore: remove DemoStatus component from docs pages

* feat: refactor OpenAPI documentation for exporting schema

* fix: updating frontend's package.json

* refactor: simplify OpenAPI documentation routes by loading URL from .env and remove api-schema.yaml

* refactor: simplify OpenAPI documentation routes by loading URL from .env and remove api-schema.yaml

Integrate docs into monorepo #109

* docs: add Japanese README and update language link

---------

Co-authored-by: soumame <[email protected]>

* fix: skip corepack signature verification (#119)

Resolves nodejs/corepack#612 temporality

* chore: wireit monorepo (#122)

* chore: wireit monorepo

* fix: type check

* fix: files

* chore: remove extensions type check from wireit configuration

---------

Co-authored-by: soumame <[email protected]>

* Vitest-setup (#123)

* 🚧 🧪 Add Vitest configuration and component tests for frontend (seems not working on vscode's extension)

* chore: update testing library dependencies in package.json

* test: add comprehensive tests for ExecSwitch and Navbar components

* fix: update letter case to resolve build error

* refactor: implement dependency injection middleware and update context types

Co-authored-by: Yuta Kobayashi <[email protected]>

* chore: export default app from backend index

* chore: add testcontainers as a dev dependency for backend testing

* chore: add Vitest configuration for backend testing

* test: add database and tutorial module tests with test helpers

* test(vitest configurations): implement backend testing

- Add .env.test file for backend testing- Modify Vitest configs to load test environment variables-
Update database utility functions to use new environment variable names- Adjust database setup and
truncate functions for testing

* refactor: update dependency injection middleware to accept database parameter

* test: add comprehensive tests for tutorial routes and endpoints

* refactor: simplify dependency injection middleware and remove explicit database parameter

* test: update session handling of backend testing with improved setup

Co-authored-by: Yuta Kobayashi <[email protected]>

* test: remove navbar component tests

* refactor: reorganize route handling and enforce session validation middleware

* docs: add server URL configuration to auth reference in OpenAPI specification

* refactor: remove session renaming functionality and simplify session update logic

* test: enhance session tests with structured operations and improved setup

* refactor: streamline route handling and reintroduce session validation middleware

* feat: add middleware for dependency injection and session management

* refactor: remove unused socket.io middleware from session module

* refactor: update import path for dependency injection middleware

* feat: add authentication middleware for session routes

* refactor: remove unnecessary console logging statements

* docs: add comprehensive testing guidelines for backend development

* test: add health check endpoint test for backend status route

* test: add comprehensive test suite for admin session management and fix unsuitable db query

* test: modify database truncate method to reset identity sequence

* test: add comprehensive test suite for admin tutorial management

* test: enhance tutorial test assertions with specific expected values

* Merge branch 'dev' into vitest-setup

* test: remove unnecessary tutorial test assertions

* test: setup MSW and enhance frontend testing infrastructure

---------

Co-authored-by: Yuta Kobayashi <[email protected]>

* chore: remove unused reset-credential command from docker-compose startup script

* feat: add CLI commands for user registration and initialization

* chore: update GitHub Actions deployment workflows (#125)

- Add environment configurations for dev and production deployments
- Remove explicit release names in GitHub release creation steps

* fix: update GitHub actions to refer OPENAPI_DOCS_URL for build /docs repo (#126)

* fix: add OPENAPI_DOCS_URL build argument for Docker and GitHub Actions (#127)

- Update Dockerfile and Dockerfile.dev to include OPENAPI_DOCS_URL build argument
- Modify GitHub Actions workflows (deploy.yaml and dev_deploy.yaml) to pass OPENAPI_DOCS_URL
- Add .env.example in docs package with default OpenAPI documentation URL

* Deploy workflow fix 4 (#129)

* chore: remove OPENAPI_DOCS_URL references from Docker and GitHub Actions

- Remove OPENAPI_DOCS_URL environment variable and build arguments from Dockerfiles
- Update GitHub Actions workflows to remove OPENAPI_DOCS_URL configuration
- Delete .env.example file in docs package

* chore: restore .env.example with OPENAPI_DOCS_URL for docs package

* Renovate Updates (#115)

* Renovate Updates

* chore(deps): update dependency better-auth to v1.1.16 [security] (#130)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency vitest to v3.0.5 [security] (#133)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency @sentry/node to v8.49.0 [security] (#132)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency vite to v5.4.12 [security] (#131)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): pin node.js (#136)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): pin dependencies (#137)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: soumame <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Bugfix 2.0.1 (#144)

* chore: update project version to 2.0.1

* fix: make user creation CLI command await role setting

Unable to add "admin" role for created user from cli #134

* chore: remove server telemetry configuration file

* feat: add session-based WebSocket proxy upgrade handling

Implement WebSocket upgrade handling with session-based validation:
- Extract sessionId from the request URL
- Check if sessionId exists and has a corresponding proxy
- Return 404 if session is invalid
- Proceed with proxy upgrade for valid sessions

Server crashes when Minecraft has connected #135

* Revert "Bugfix 2.0.1 (#144)" (#149)

This reverts commit d96f9f7.

* Bugfix-2.0.1 (#154)

* chore: update project version to 2.0.1

* fix: make user creation CLI command await role setting

Unable to add "admin" role for created user from cli #134

* chore: remove server telemetry configuration file

* feat: add session-based WebSocket proxy upgrade handling

Implement WebSocket upgrade handling with session-based validation:
- Extract sessionId from the request URL
- Check if sessionId exists and has a corresponding proxy
- Return 404 if session is invalid
- Proceed with proxy upgrade for valid sessions

Server crashes when Minecraft has connected #135

---------

Co-authored-by: Yuta Kobayashi <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.