Skip to content
Open
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
19 changes: 19 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"extends": ["@commitlint/config-conventional"],
"rules": {
"type-enum": [2, "always", [
"feat",
"fix",
"docs",
"style",
"refactor",
"perf",
"test",
"build",
"ci",
"chore",
"revert"
]],
"subject-case": [0]
}
}
14 changes: 14 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@ A clear and concise description of what this PR changes and why.
- Closes #
- Fixes #

## Commit Type

- [ ] `feat`: A new feature
- [ ] `fix`: A bug fix
- [ ] `docs`: Documentation only changes
Comment thread
DanbabaJr marked this conversation as resolved.
- [ ] `style`: Changes that do not affect the meaning of the code
- [ ] `refactor`: A code change that neither fixes a bug nor adds a feature
- [ ] `perf`: A code change that improves performance
- [ ] `test`: Adding missing tests or correcting existing tests
- [ ] `build`: Changes that affect the build system or external dependencies
- [ ] `ci`: Changes to our CI configuration files and scripts
- [ ] `chore`: Other changes that don't modify src or test files
- [ ] `revert`: Reverts a previous commit

## Testing Done

Describe the tests you ran and how to reproduce them.
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/deploy-storybook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy Storybook to GitHub Pages

on:
push:
branches: [main]
paths:
- 'frontend/**'

permissions:
contents: write
pages: write
id-token: write

jobs:
build-and-deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v4
Comment thread
DanbabaJr marked this conversation as resolved.
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
cache-dependency-path: frontend/package-lock.json
- run: npm ci
- run: npm run build-storybook
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./storybook-static
Comment on lines +29 to +32

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== workflow files =="
git ls-files '.github/workflows/*' || true

echo "== target workflow excerpt =="
if [ -f .github/workflows/deploy-storybook.yml ]; then
  cat -n .github/workflows/deploy-storybook.yml
else
  echo "target workflow not found"
fi

echo "== search for storybook-static usage and defaults/working-directory =="
rg -n "storybook-static|defaults:\s*run:\s*working-directory|working-directory:|uses: peaceiris/actions-gh-pages|build-storybook|storybook" -S .

echo "== git status/stat =="
git status --short || true
git diff --stat || true

Repository: ritik4ever/stellar-goal-vault

Length of output: 3787


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== frontend package scripts and config files =="
cat -n frontend/package.json

echo "== storybook config files =="
git ls-files frontend | rg '(^|/)(.storybook|storybook\.config|vite\.config|package\.json)$' || true

for f in frontend/.storybook/main.ts frontend/.storybook/main.js frontend/.storybook/main.cjs frontend/.storybook/main.mjs frontend/.storybook/preview.ts frontend/.storybook/preview.js frontend/.storybook/preview.cjs frontend/.storybook/preview.mjs frontend/vite.config.ts frontend/vite.config.js frontend/package.json; do
  if [ -f "$f" ]; then
    echo "--- $f"
    cat -n "$f"
  fi
done

echo "== action usage refs =="
rg -n "peaceiris/actions-gh-pages" .github/workflows packages.json package.json 2>/dev/null || true

Repository: ritik4ever/stellar-goal-vault

Length of output: 5773


🌐 Web query:

GitHub Actions workflow syntax defaults.run.working-directory apply only to run steps

💡 Result:

Yes, the GitHub Actions workflow syntax for defaults.run.working-directory applies exclusively to run steps [1][2][3]. According to official GitHub documentation, the defaults.run keyword is used to provide default shell and working-directory options specifically for all run steps within a workflow or a job [1][4][5]. This setting does not affect other types of steps, such as those that use uses to invoke actions [6]. Actions executed via uses manage their own execution environment and are not impacted by the defaults.run configuration [6]. To summarize the scope: - It applies to run steps (commands executed directly in the shell) [1][2]. - It does not apply to steps that utilize uses (actions) [6]. - You can set these defaults at the workflow level (under defaults:) or override them at the job level (under jobs.<job_id>.defaults:) [1][2][3]. Job-level settings take precedence over workflow-level settings [1][3].

Citations:


🌐 Web query:

peaceiris actions-gh-pages v3 publish_dir working directory behavior

💡 Result:

In peaceiris/actions-gh-pages (including v3), the publish_dir option specifies the source directory within your repository that contains the static files you wish to deploy to the gh-pages branch [1][2]. The contents of this specified directory are copied to the root of the target branch (gh-pages by default) [1][3]. Key behaviors regarding publish_dir include: 1. Default Directory: If not specified, the action defaults to using a directory named public in the root of your repository [1][3]. 2. Path Resolution: The path provided to publish_dir is relative to the workspace root (GITHUB_WORKSPACE) [4][5]. 3. Repository Root Interaction: If you set publish_dir to. (the repository root), the action may inadvertently attempt to delete or modify the.git directory within the workspace, which can cause deployment failures [4]. It is generally recommended to use a dedicated subdirectory (e.g.,./dist or./public) for your build artifacts to avoid this [6]. 4. Cleanup Behavior: By default, the action removes existing files in the target branch before deploying the new contents from publish_dir [7]. You can use the keep_files option if you wish to preserve existing files in the target branch [8][7]. For complex setups where you need to deploy specific files or handle directories already present in the workspace, common practices include creating a dedicated build output directory or using a post-build step to copy all necessary assets into a single directory before calling the action [6][5].

Citations:


🌐 Web query:

peaceiris actions-gh-pages v4 README publish_dir

💡 Result:

In the peaceiris/actions-gh-pages version 4 GitHub Action, the publish_dir input specifies the source directory containing the static files you wish to deploy to GitHub Pages [1][2]. Key details regarding publish_dir include: - Function: It defines the directory from which the action will copy and deploy files [1][3]. - Default Value: The default directory is./public [1][2][4]. - Behavior: Only the contents of the specified directory are pushed to the target branch (which defaults to gh-pages) [1][3]. Example usage in a workflow file: - name: Deploy uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir:./public

Citations:


Publish the generated Storybook directory and use a supported deploy action.

defaults.run.working-directory only affects run steps, so peaceiris/actions-gh-pages receives ./storybook-static at the repository root. Storybook is configured to emit frontend/storybook-static, so update publish_dir and move to the supported v4 artifact.

Proposed fix
-      - uses: peaceiris/actions-gh-pages@v3
+      - uses: peaceiris/actions-gh-pages@v4
         with:
           github_token: ${{ secrets.GITHUB_TOKEN }}
-          publish_dir: ./storybook-static
+          publish_dir: ./frontend/storybook-static
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./storybook-static
- uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./frontend/storybook-static
🧰 Tools
🪛 actionlint (1.7.12)

[error] 29-29: the runner of "peaceiris/actions-gh-pages@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/deploy-storybook.yml around lines 29 - 32, Update the
Storybook deployment step using peaceiris/actions-gh-pages so it uses the
supported v4 action and publishes the generated frontend/storybook-static
directory instead of resolving publish_dir from the repository root.

Source: Linters/SAST tools

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ contracts/.stellar/
backend/data/
CLAUDE.md
pr.md
issue.md
issue.md
storybook-static/
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx --no-install commitlint --edit $1
3 changes: 3 additions & 0 deletions .kilo/kilo.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"$schema": "https://app.kilo.ai/config.json"
}
24 changes: 14 additions & 10 deletions frontend/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
import type { StorybookConfig } from '@storybook/react-vite';

const config: StorybookConfig = {
"stories": [
"../src/**/*.mdx",
"../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"
stories: [
'../src/**/*.mdx',
'../src/**/*.stories.@(js|jsx|mjs|ts|tsx)',
],
"addons": [
"@chromatic-com/storybook",
"@storybook/addon-vitest",
"@storybook/addon-a11y",
"@storybook/addon-docs",
"@storybook/addon-mcp"
addons: [
'@chromatic-com/storybook',
'@storybook/addon-vitest',
'@storybook/addon-a11y',
'@storybook/addon-docs',
],
"framework": "@storybook/react-vite"
framework: '@storybook/react-vite',
outputPath: 'storybook-static',
viteFinal: (config) => {
config.base = '/stellar-goal-vault/';
return config;
},
};
export default config;
10 changes: 9 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
"build:analyze": "tsc && ANALYZE=true vite build",
"preview": "vite preview",
"test": "vitest",
"lint": "eslint 'src/**/*.{ts,tsx}'"
"lint": "eslint 'src/**/*.{ts,tsx}'",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"test-storybook": "test-storybook"
Comment thread
DanbabaJr marked this conversation as resolved.
},
"dependencies": {
"@creit.tech/xbull-wallet-connect": "^0.4.0",
Expand All @@ -28,6 +31,11 @@
"zod": "^4.3.6"
},
"devDependencies": {
"@chromatic-com/storybook": "^8.0.0",
"@storybook/addon-a11y": "^8.0.0",
"@storybook/addon-docs": "^8.0.0",
"@storybook/addon-vitest": "^8.0.0",
"@storybook/react-vite": "^8.0.0",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.1",
Expand Down
Loading