Skip to content

Codexfix fullhistory#263

Open
bsureshkrishna wants to merge 120 commits intotestfrom
codexfix-fullhistory
Open

Codexfix fullhistory#263
bsureshkrishna wants to merge 120 commits intotestfrom
codexfix-fullhistory

Conversation

@bsureshkrishna
Copy link
Contributor

Title: Vibe-coded fix for functionality and security etc.

Description: This is a HUGE change. Entirely vibe-coded, but with logical checks and some manual front-end checks by someone who does not know web development, but knows programming.

Screenhots (if any):

Resolves # Does not resolve anything. Does a lot of security analysis. Changes, reviews etc. summarized in various files in the root directory. Also an experiment to see how well such coding can work for the front-end, where for the most part, truth is in a functional front-end (and so bad code will just lead to crashes, rather than serious backend problems, hopefully). This version includes a fuller history. Cherry-pick can be used, but I suspect that a functional comparison is the way to go.. and then some kind of code review folowed by wholeslae shifting to this branch. IT includes all changes up to the most recent test changes in this commit:

commit 99618a2 (HEAD -> test, origin/test)
Merge: 690dc43 c72b77b
Author: Armaan Alam 39340406+armanalam03@users.noreply.github.com
Date: Mon Jan 26 16:13:57 2026 +0530

Merge pull request #259 from airfusion64/test1

created a 404 error page. 

There are no merge conflicts now.

I had to make decisions about various conflicts already.. and that history of my decisions is in the change log .md file.

I would recommend testing the website manually, and expecially tesitng hte pdf viewer component(thatI did not test). Playwright would be great !

bsureshkrishna and others added 30 commits February 7, 2026 17:10
Current diff summary:

- 49 files modified, 0 staged previously, 0 untracked.

- Net: 321 insertions, 274 deletions.

Main change buckets:

- Type-safety/lint cleanup across generated API clients (9+ files under src/api/*):

  - SecondParameter<T extends (...args: any) => any> replaced with infer-based generic using unknown.

  - Minor trailing blank-line additions at file ends.

- Realtime hook hardening in src/hooks/useRealtime.tsx:

  - Replaced many any usages with typed cache shapes and unknown.

  - Added isRecord guard for safer error handling.

  - Refactored registerQueue placement/dependencies.

  - Safer cache update logic and dependency fixes in callbacks/effects.

  - This is the largest functional change (+95/-59).

- Middleware and runtime config:

  - src/middleware.ts skips static/public assets explicitly and expands matcher exclusion for files with extensions.

  - next.config.mjs disables PWA in development (process.env.NODE_ENV === 'development').

  - package.json start changed to node .next/standalone/server.js.

- About page trim:

  - src/app/(main)/about/page.tsx removed team/social components and member list (large deletion, -80 lines).

- Discussion/external article robustness:

  - src/app/(main)/discussions/DiscussionsSidebar.tsx adds runtime checks for article fields before rendering/selecting.

  - src/stores/useFetchExternalArticleStore.ts adds typed parsing for CrossRef/PubMed/arXiv inputs using unknown plus shaped casts.

- Smaller lint/deps fixes across UI/components/tests:

  - Unused vars renamed with underscore prefixes.

  - useEffect dependencies corrected in multiple files.

  - any reduced in helpers/components/tests (useDebounceThrottle, icons, editor, tests).

  - src/components/ui/multiple-selector.tsx: EmptyItem() rendering was uncommented (behavioral UI change).

Notable behavioral changes to sanity-check quickly:

- src/components/ui/multiple-selector.tsx now always renders EmptyItem().

- src/app/(main)/about/page.tsx content was heavily removed.

- package.json start now expects standalone build output.
Current diff summary:

- 49 files modified, 0 staged previously, 0 untracked.

- Net: 321 insertions, 274 deletions.

Main change buckets:

- Type-safety/lint cleanup across generated API clients (9+ files under src/api/*):

  - SecondParameter<T extends (...args: any) => any> replaced with infer-based generic using unknown.

  - Minor trailing blank-line additions at file ends.

- Realtime hook hardening in src/hooks/useRealtime.tsx:

  - Replaced many any usages with typed cache shapes and unknown.

  - Added isRecord guard for safer error handling.

  - Refactored registerQueue placement/dependencies.

  - Safer cache update logic and dependency fixes in callbacks/effects.

  - This is the largest functional change (+95/-59).

- Middleware and runtime config:

  - src/middleware.ts skips static/public assets explicitly and expands matcher exclusion for files with extensions.

  - next.config.mjs disables PWA in development (process.env.NODE_ENV === 'development').

  - package.json start changed to node .next/standalone/server.js.

- About page trim:

  - src/app/(main)/about/page.tsx removed team/social components and member list (large deletion, -80 lines).

- Discussion/external article robustness:

  - src/app/(main)/discussions/DiscussionsSidebar.tsx adds runtime checks for article fields before rendering/selecting.

  - src/stores/useFetchExternalArticleStore.ts adds typed parsing for CrossRef/PubMed/arXiv inputs using unknown plus shaped casts.

- Smaller lint/deps fixes across UI/components/tests:

  - Unused vars renamed with underscore prefixes.

  - useEffect dependencies corrected in multiple files.

  - any reduced in helpers/components/tests (useDebounceThrottle, icons, editor, tests).

  - src/components/ui/multiple-selector.tsx: EmptyItem() rendering was uncommented (behavioral UI change).

Notable behavioral changes to sanity-check quickly:

- src/components/ui/multiple-selector.tsx now always renders EmptyItem().

- src/app/(main)/about/page.tsx content was heavily removed.

- package.json start now expects standalone build output.
Document that images.unoptimized=true breaks rendering in this app.

Remove localhost/127.0.0.1 from next/image remotePatterns to avoid SSRF via /_next/image with user-controlled URLs.
Update caniuse-lite in yarn.lock from 1.0.30001643 to 1.0.30001769.
Add pre-start standalone asset sync to copy public/ and .next/static into .next/standalone before launching server.js.

Prevents /_next/image from receiving HTML fallback for local assets like /logo.png in standalone runs.
Add interactive bookmark and preview functionality to ArticleCard component:

- Create ArticlePreviewDrawer component for quick article preview in a
  floating drawer with title, abstract, authors, community, and ratings
- Add bookmark icon (top right, always visible) that toggles article
  bookmark status using the bookmark API
- Add preview icon (top right, visible on hover) that opens the preview
  drawer
- Integrate with useUsersCommonApiToggleBookmark and
  useUsersCommonApiGetBookmarkStatus hooks
- Add hover state management to show/hide preview icon
- Icons have semi-transparent backgrounds for visibility over images
- Tooltips for both icons
- Require authentication for bookmarking with helpful error messages
- Handle bookmark state with optimistic UI updates

Icons only appear on 'default' and 'full' compact types, not 'minimal'.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Update test expectations to match current implementation:

- authStore.test.ts: Update cookie removal expectations to include
  cookie options (sameSite, secure) that are now passed to Cookies.remove()
- middleware.test.ts: Update backend validation test to reflect that
  middleware only validates cookies locally without calling backend API
  for performance reasons. Rename test to clarify this behavior.

All 24 tests now passing.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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.

1 participant