Huge difference in coding understanding/response compared to online Agent + Sources + github repo
What version of Codex is running?
codex-cli 0.31.0
Which model were you using?
gpt-5 ... Reasoning Effort: High and Reasoning Summaries: Detailed
What platform is your computer?
Darwin 24.5.0 arm64 arm
What steps can reproduce the bug?
Ask codex cli to add a ko-fi button for donations to an AboutModal.tsx page in your Next.js React app, and watch as it launches off into this overly complicated coding.
Instead of responding similar to the _online GPT-5 + Agents + Sources + github repo_ with this well understood reply:
You don’t want the floating overlay. Skip the Ko-fi overlay script and add a regular Ko-fi link/button inside the About modal’s content so it opens/closes with the modal.
Below is a minimal patch you can drop in at the bottom of components/AboutModal.tsx (right before your modal’s footer/Close button, or as a footer row). Tailwind classes are just examples—adjust to your design.
TypeScript/React snippet to place inside the modal body/footer:
```tsx
{/* --- Ko-fi Donate (scoped to About modal) --- */}
<div className="mt-6 flex items-center justify-center">
<a
href="https://ko-fi.com/slipthetrap"
target="_blank"
rel="noopener noreferrer"
className="inline-flex items-center rounded-xl px-4 py-2 text-sm font-medium shadow hover:opacity-90 focus:outline-none focus:ring"
style={{ backgroundColor: '#794bc4', color: '#fff' }}
aria-label="Donate on Ko-fi"
>
Donate
</a>
</div>
If you prefer to use Ko-fi’s official button image instead of styling:
<div className="mt-6 flex items-center justify-center">
<a
href="https://ko-fi.com/slipthetrap"
target="_blank"
rel="noopener noreferrer"
aria-label="Donate on Ko-fi"
>
<img
src="https://storage.ko-fi.com/cdn/kofi5.png"
alt="Buy me a coffee at ko-fi.com"
style={{ height: 36 }}
/>
</a>
</div>
Notes
- Do not include the overlay widget script you pasted—that creates a page-level floating chat and can’t be confined to the modal’s lifecycle.
- Because this is a plain link/button, it only exists while the About modal is rendered, so it naturally shows and closes with the About page itself.
If you want me to drop this into your current AboutModal.tsx structure, paste that file here and I’ll return the full file with the button placed exactly where it belongs.
To avoid a permanently floating Ko‑fi widget, you can embed the donation link directly inside your modal’s JSX instead of relying on Ko‑fi’s overlay script (which always floats). Here’s how you can do it in AboutModal.tsx.
Add a small “Donate” button at the bottom of your About page, just before you close the modal’s wrapper element:
// components/AboutModal.tsx
'use client';
import { ThemeConfig } from '../app/shared/theme';
// ...other imports you already have…
interface AboutModalProps {
isOpen: boolean;
onClose: () => void;
isDarkMode: boolean;
theme: ThemeConfig;
}
export default function AboutModal({
isOpen,
onClose,
isDarkMode,
theme,
}: AboutModalProps) {
if (!isOpen) return null;
return (
<div
className="fixed inset-0 z-50 flex items-start justify-center overflow-y-auto px-2 pt-8"
role="dialog"
aria-modal="true"
>
{/* ...header and body content... */}
{/* Existing sections (Welcome Guide, How Projects Work, etc.) */}
{/* Pro Tip section */}
<section className="mt-6">
{/* … existing text … */}
</section>
{/* Ko‑fi donation button (non‑floating) */}
<div className="mt-6 flex justify-center">
<a
href="https://ko-fi.com/slipthetrap"
target="_blank"
rel="noopener noreferrer"
className="inline-flex items-center rounded-full px-4 py-2 text-sm font-medium shadow"
style={{ backgroundColor: '#794bc4', color: '#fff' }}
aria-label="Donate on Ko‑fi"
>
Donate
</a>
</div>
{/* Close button or modal footer */}
</div>
);
}
This approach:
- Doesn’t inject any external scripts, so nothing floats around the site.
- Displays a “Donate” button styled with your brand colors (
#794bc4and white text). - Closes automatically with the modal, since it lives inside the modal’s markup.
Place this new <div> section just above the closing tag of your modal’s container (e.g., before the modal footer or closing </div>). Adjust the Tailwind classes to match your existing styling, if needed.
_Now that's useful!_
What is the expected behavior?
That codex cli understands and responds as well as the _online GPT-5 + Agents + Sources + github repo_ does ... aren't both using the same model ?
What do you see instead?
I see time and again an overly complicated response that leans heavily into complex coding.
No matter how much I inject to correct it's behaviour.
Additional information
I do not understand how they are so dissimilar. Yes, I know they won't be exactly the same, ever, but it should be similar for something this simple:
add this to AboutModal.tsx
{/* --- Ko-fi Donate (scoped to About modal) --- */}
<div className="mt-6 flex items-center justify-center">
<a
href="https://ko-fi.com/slipthetrap"
target="_blank"
rel="noopener noreferrer"
className="inline-flex items-center rounded-xl px-4 py-2 text-sm font-medium shadow hover:opacity-90 focus:outline-none focus:ring"
style={{ backgroundColor: '#794bc4', color: '#fff' }}
aria-label="Donate on Ko-fi"
>
Donate
</a>
</div>
... come on!
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗