Skip to content

仮デプロイ - #33

Merged
Myxogastria0808 merged 5 commits into
mainfrom
dev
Jan 14, 2026
Merged

仮デプロイ#33
Myxogastria0808 merged 5 commits into
mainfrom
dev

Conversation

@Myxogastria0808

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings January 14, 2026 04:28
@Myxogastria0808
Myxogastria0808 merged commit be7d997 into main Jan 14, 2026
12 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds session validation functionality and UI improvements to the Pay Crew2 application. The title "仮デプロイ" (Temporary Deployment) suggests this is a staging deployment for testing purposes.

Changes:

  • Added session check endpoint (/api/session) for validating user sessions
  • Introduced new routing structure with Share layout and SessionCheck wrapper components
  • Created reusable UI components (Title, SubTitle, MarkdownContent, Loading, LinkButton, Error)
  • Added Terms and Privacy policy pages with markdown rendering support
  • Updated HTML metadata, favicons, and global styling

Reviewed changes

Copilot reviewed 41 out of 59 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
products/validator/src/response/check.ts New validator schema for session check response
products/backend/src/presentation/routes/check.ts New backend endpoint for session validation
products/frontend/src/routes/Share/index.tsx New layout component with header and footer
products/frontend/src/routes/SessionCheck/index.tsx Session validation wrapper for protected routes
products/frontend/src/share/*.tsx Reusable UI components (Title, SubTitle, MarkdownContent)
products/frontend/src/routes/Root/index.tsx Refactored to use session check and new components
products/frontend/index.html Added comprehensive metadata, OGP tags, and favicon references
package.json Added react-markdown and remark-gfm dependencies
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

};

const SubTitle: FC<Props> = (props: Props) => {
return <h1 className={styles.subTitle}>{props.subTitle}</h1>;

Copilot AI Jan 14, 2026

Copy link

Choose a reason for hiding this comment

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

SubTitle component uses <h1> which is semantically incorrect for a subtitle. Subtitles should use <h2> or lower heading levels. Using multiple <h1> tags on a page can harm SEO and accessibility.

Copilot uses AI. Check for mistakes.
};

const Loading: FC<Props> = (props: Props) => {
return <h1 className={styles.title}>{props.content}</h1>;

Copilot AI Jan 14, 2026

Copy link

Choose a reason for hiding this comment

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

Loading component uses <h1> for displaying loading text, which is semantically incorrect. Loading messages should use <p> or <div> elements instead of heading tags.

Copilot uses AI. Check for mistakes.
Comment on lines +10 to +12
const LinkButton: FC<Props> = (props: Props) => {
return <h1 className={styles.title}>{props.content}</h1>;
};

Copilot AI Jan 14, 2026

Copy link

Choose a reason for hiding this comment

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

LinkButton component renders an <h1> element but doesn't use the path prop to create an actual link. This component should render a link element (<Link> or <a>) using the path prop to be functional as a button.

Copilot uses AI. Check for mistakes.
};

const Error: FC<Props> = (props: Props) => {
return <h1 className={styles.title}>{props.content}</h1>;

Copilot AI Jan 14, 2026

Copy link

Choose a reason for hiding this comment

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

Error component uses <h1> for displaying error messages, which is semantically incorrect. Error messages should use appropriate ARIA roles or <p> elements with proper styling instead of heading tags.

Copilot uses AI. Check for mistakes.
Comment on lines +17 to +19
useEffect(() => {
sessionCheckMutation.mutate({ credentials: 'include' });
}, []);

Copilot AI Jan 14, 2026

Copy link

Choose a reason for hiding this comment

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

The useEffect dependency array is empty but uses sessionCheckMutation. This should include sessionCheckMutation in the dependencies or use sessionCheckMutation.mutate directly if it's stable. This could cause issues with React's exhaustive-deps rule.

Copilot uses AI. Check for mistakes.
Comment on lines +15 to +17
useEffect(() => {
sessionCheckMutation.mutate({ credentials: 'include' });
}, []);

Copilot AI Jan 14, 2026

Copy link

Choose a reason for hiding this comment

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

The useEffect dependency array is empty but uses sessionCheckMutation. This should include sessionCheckMutation in the dependencies or use sessionCheckMutation.mutate directly if it's stable. This could cause issues with React's exhaustive-deps rule.

Copilot uses AI. Check for mistakes.
Comment on lines +18 to +20
useEffect(() => {
sessionCheckMutation.mutate({ credentials: 'include' });
}, []);

Copilot AI Jan 14, 2026

Copy link

Choose a reason for hiding this comment

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

The useEffect dependency array is empty but uses sessionCheckMutation. This should include sessionCheckMutation in the dependencies or use sessionCheckMutation.mutate directly if it's stable. This could cause issues with React's exhaustive-deps rule.

Copilot uses AI. Check for mistakes.
Comment on lines +108 to +109
{receivables.map((t) => (
<li key={t.counterparty_id}>

Copilot AI Jan 14, 2026

Copy link

Choose a reason for hiding this comment

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

The key uses t.counterparty_id which could cause issues if the same counterparty appears multiple times. Consider using a more unique identifier if available, or combining with additional fields to ensure uniqueness.

Copilot uses AI. Check for mistakes.
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pay-crew2</title>
<meta property="description" content="台帳管理サービス「Pay Crew2」です。" />

Copilot AI Jan 14, 2026

Copy link

Choose a reason for hiding this comment

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

The description meta tag should use name attribute instead of property attribute. The property attribute is for Open Graph protocol, while standard HTML meta tags use name.

Suggested change
<meta property="description" content="台帳管理サービス「Pay Crew2」です。" />
<meta name="description" content="台帳管理サービス「Pay Crew2」です。" />

Copilot uses AI. Check for mistakes.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8befd5bae7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +12 to +16
const sessionCheckMutation = $api.useMutation('get', '/api/session', {
onError: () => {
navigate('/login', { replace: true });
},
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid redirecting public pages to login from header

Because the Header runs a session check on mount and unconditionally redirects on any error, unauthenticated users visiting public routes like /terms or /privacy (which are outside SessionCheck in App routing) will still get bounced to /login. That makes those public pages inaccessible whenever /api/session returns 401. Consider limiting this redirect to protected routes only, or handling 401 by showing the login link without navigation.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants