Routing guards & shared landing layout#174
Open
medazizktata25 wants to merge 5 commits intoGuepard-Corp:mainfrom
Open
Routing guards & shared landing layout#174medazizktata25 wants to merge 5 commits intoGuepard-Corp:mainfrom
medazizktata25 wants to merge 5 commits intoGuepard-Corp:mainfrom
Conversation
…troduce ProjectGuard for project context validation
…enhanced user experience; implement brand typing animation and section dividers for better visual structure (shared between root route content and dashboard page inside project)
…ranslation function to notebook effect dependencies for improved functionality (checks fix)
…n, and project loaders; implement conversation page slug validation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Title
✨ Routing guards & shared landing layout
What
ErrorBoundaryrenders inside the normal app shell (head, theme, providers) and shows the shared NotFoundPage or i18n generic error./only auto-redirects to the last project when it was used within the last hour, otherwise shows the landing.QweryPromptInputProps, import + lint fixes.How
Commits on this branch:
0ee206fb– Implement error handling and loading states across various routes; introduce ProjectGuard for project context validationRouting / guards
ProjectGuardinproject-context:useProject(); while loading shows a minimal loading UI.new Response('Not Found', { status: 404 }).qwery:last-project-used-atfor “recentness” logic.SidebarLayoutandSimpleModeSidebarLayoutwrap content in<ProjectProvider><ProjectGuard>…</ProjectGuard></ProjectProvider>.organization/index.tsx,project/index.tsx,datasource/{tables,table,schema}.tsx:DomainExceptionfrom services and rethrow404.project/conversation/conversation.tsx:Error shell
ErrorBoundaryinapps/web/app/root.tsx:<App />(meta, links, providers, theme, language, csrf).NotFoundPage.common:errorPageHeading+common:genericErrorSubHeading.a119dcf2– Refactor landing page components and introduce new feature cards for enhanced user experience; implement brand typing animation and section dividers for better visual structure (shared between root route content and dashboard page inside project)Shared landing components (new)
apps/web/components/landing/:use-brand-typing-animation.ts: encapsulates the “Query → Qwery” typing + delete + retype cycle, exposesbrandTextandshowCursor.landing-hero.tsx: logo + brand typing + title + subtitle.landing-section-divider.tsx: reusable labeled divider row.landing-feature-card.tsx: standard feature card UI.index.ts: barrel export.Root landing (
apps/web/app/routes/index.tsx)<LandingHero title={...} subtitle={...} />with greeting vs generic title.<LandingSectionDivider label="What you can do" />and"Get started now".<LandingFeatureCard>for the feature grid.qwery:last-project-slugandqwery:last-project-used-atfromlocalStorage./prj/:slugonly if timestamp is recent."Let’s go"asLet's go.Project welcome (
apps/web/app/routes/project/_components/welcome.tsx)useEffect+brandText/showCursorstate.<LandingHero title={t('heroTitle')} subtitle={t('heroSubtitle')} />.<LandingSectionDivider label={t('quickActions')} />and label for sample data.PromptInput, suggestion buttons, quick actions, playground section.ffe87626– Fix: clean up imports in organization route and project layout; add translation function to notebook effect dependencies for improved functionality (checks fix)organization/index.tsx: remove unusedTransimport.project/layout.tsx: stop importing unusedAgentTabs(keepAgentStatusProvider).project/notebook.tsx:ttohandleDeleteNotebookuseCallbackdeps to satisfyreact-hooks/exhaustive-deps.index.tsx:"Let's"properly; keep Tailwind arbitrary class warnings as-is (non-fatal suggestions).Review Guide
Routing / guards / 404 behavior
apps/web/lib/context/project-context.tsx–ProjectGuard, localStorage timestamp.apps/web/app/routes/organization/index.tsx,project/index.tsx,datasource/{tables,table,schema}.tsx,project/conversation/conversation.tsx– loader and component 404 paths.Error shell and root
apps/web/app/root.tsx–ErrorBoundaryand use of app shell + i18n messages.Landing & welcome modularization
apps/web/components/landing/*– new shared components and hook.apps/web/app/routes/index.tsx– landing refactor + recent-project redirect.apps/web/app/routes/project/_components/welcome.tsx– refactored to use shared landing modules.Misc correctness / typecheck
apps/web/app/routes/project/notebook.tsx–useCallbackdeps and unsaved state registration.packages/ui/src/qwery/agent-ui.tsx– prop alignment withQweryPromptInputProps.Testing
/with and withoutqwery:last-project-*in localStorage, and with timestamps older/newer than 1h.pnpm lintforapps/webandpackages/ui(fixed previous errors).pnpm typechecknow passes for@qwery/uiandapps/web(noQweryPromptInputPropsmismatch).Documentation / User Impact
User impact
/behavior is sane: only “sticky” redirect if you actually used that project recently.Docs
ProjectGuard+ loader-based 404s.