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
80 changes: 80 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Bug Report
description: Report a bug or unexpected behavior in Ycode
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to report a bug! Please fill out the sections below so we can reproduce and fix the issue.

- type: textarea
id: description
attributes:
label: Description
description: A clear and concise description of the bug.
placeholder: Describe what went wrong...
validations:
required: true

- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: Detailed steps to reproduce the behavior.
placeholder: |
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected behavior
description: What you expected to happen.
validations:
required: true

- type: textarea
id: actual
attributes:
label: Actual behavior
description: What actually happened.
validations:
required: true

- type: textarea
id: screenshots
attributes:
label: Screenshots or screen recordings
description: If applicable, add screenshots or recordings to help explain the problem.

- type: dropdown
id: deployment
attributes:
label: Deployment type
options:
- Self-hosted
- Ycode Cloud
validations:
required: true

- type: input
id: browser
attributes:
label: Browser
placeholder: e.g. Chrome 120, Firefox 121, Safari 17

- type: input
id: os
attributes:
label: Operating system
placeholder: e.g. macOS 15, Windows 11, Ubuntu 24.04

- type: textarea
id: additional
attributes:
label: Additional context
description: Any other context about the problem (error messages, console logs, etc.).
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Documentation
url: https://docs.ycode.com
about: Check the docs — your question may already be answered.
- name: Discord Community
url: https://discord.gg/xadfw2DV4q
about: Chat with the community and get help with self-hosting.
56 changes: 56 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Feature Request
description: Suggest a new feature or improvement for Ycode
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thanks for suggesting a feature! Please describe your idea below.

- type: textarea
id: problem
attributes:
label: Problem or motivation
description: What problem does this feature solve? Is it related to a frustration?
placeholder: I'm always frustrated when...
validations:
required: true

- type: textarea
id: solution
attributes:
label: Proposed solution
description: Describe the solution you'd like. Be as specific as possible.
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives considered
description: Describe any alternative solutions or workarounds you've considered.

- type: dropdown
id: area
attributes:
label: Area
description: Which part of Ycode does this relate to?
options:
- Visual Editor
- Collections / CMS
- Pages & Routing
- Components
- Assets & Media
- Design Properties
- Settings
- API
- Self-hosting / Deployment
- Other
validations:
required: true

- type: textarea
id: additional
attributes:
label: Additional context
description: Any mockups, screenshots, or references that help illustrate the feature.
15 changes: 15 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Summary

<!-- 1-3 sentences: what changed and why. Link related issues with "Closes #123". -->

## Changes

<!-- Bullet list of specific changes, grouped logically. Focus on behavior, not files. -->

-

## Test plan

<!-- Actionable checklist to verify the changes are working. Include edge cases. -->

- [ ]
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,6 @@ next-env.d.ts

# turbo
.turbo

# scripts
release.sh
52 changes: 52 additions & 0 deletions app/ycode/api/setup/check-email-confirm/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import { noCache } from '@/lib/api-response';
import { getSupabaseConfig } from '@/lib/supabase-server';

export const dynamic = 'force-dynamic';
export const revalidate = 0;

/**
* GET /ycode/api/setup/check-email-confirm
*
* Checks whether the Supabase "Confirm email" setting is disabled
* by querying GoTrue's public /settings endpoint which exposes
* the mailer autoconfirm flag.
*/
export async function GET() {
try {
const creds = await getSupabaseConfig();

if (!creds) {
return noCache(
{ error: 'Supabase not configured' },
500
);
}

const settingsResponse = await fetch(
`${creds.projectUrl}/auth/v1/settings`,
{
headers: { 'apikey': creds.anonKey },
}
);

if (!settingsResponse.ok) {
return noCache(
{ error: 'Failed to fetch auth settings from Supabase' },
500
);
}

const settings = await settingsResponse.json();
const isAutoconfirm = settings.mailer_autoconfirm === true;

return noCache({
autoconfirm: isAutoconfirm,
});
} catch (error) {
console.error('Check email confirm failed:', error);
return noCache(
{ error: 'Failed to check email confirmation setting' },
500
);
}
}
5 changes: 3 additions & 2 deletions app/ycode/components/HeaderBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,12 @@ export default function HeaderBar({
}, [routeType, optimisticNav]);

// Derive active button: optimistic state takes priority, then URL
const activeNavButton = useMemo((): NavButton => {
const activeNavButton = useMemo((): NavButton | null => {
if (optimisticNav) return optimisticNav;
if (routeType === 'collection' || routeType === 'collections-base') return 'cms';
if (routeType === 'forms') return 'forms';
return 'design';
if (routeType === 'layers' || routeType === 'page' || routeType === 'component' || routeType === null) return 'design';
return null;
}, [optimisticNav, routeType]);

const [theme, setTheme] = useState<'system' | 'light' | 'dark'>(() => {
Expand Down
Loading