# Recent Changes and Migration Context

This file captures recent cleanup/migration work so future agents do not reverse it.

## AntD 5 Deprecation Cleanup

Warnings addressed:

- `Collapse expandIconPosition` left/right deprecated.
- `rc-collapse children` deprecated.
- `Table rowKey` index parameter deprecated.
- Static `message` cannot consume dynamic theme context.
- `Dropdown overlay` deprecated.
- `RangePicker ranges` deprecated.

Patterns now used:

- `Collapse items`
- `expandIconPosition="end"`
- `Dropdown menu`
- stable table row keys
- `RangePicker presets`
- `src/util/antdFeedback.js` for feedback APIs
- AntD `<App>` wrapper and bridge in `src/App/App.jsx`

## Redux CreateStore Warning

`src/redux/store.js` imports:

```js
import { legacy_createStore as createStore, applyMiddleware, compose } from "redux";
```

This intentionally keeps the current Redux architecture while avoiding the visual deprecation warning. Do not change to plain `createStore`.

## Job Detail Flash Fix

`src/components/organisms/jobs-detail/jobs-detail.organism.jsx` debounces selected job id and shows a skeleton during transitions. This prevents a fraction-of-a-second stale/partial render in the left panel.

When editing this area:

- Preserve stale-data guards.
- Preserve a stable loading state when selected id changes.
- Do not render details for a job whose id does not match current selection.

## Apollo Pagination/Cache Fixes

`src/graphql/GraphQLClient.js` includes offset merge policies:

- `Query.jobs`
- `Query.search_jobs`

List components were hardened against missing previous/incoming arrays.

## Electron Package Upgrades

Packages upgraded together:

- `electron-context-menu` to `^4.1.2`
- `electron-is-dev` to `^3.0.1`
- `electron-store` to `^11.0.2`
- `electron` to `^42.3.0`
- `electron-builder` to `^26.8.1`
- `@sentry/electron` to `^7.13.0`

Important migration consequences:

- `electron-store` is initialized asynchronously via dynamic import.
- `electron-context-menu` is dynamically imported.
- `electron-is-dev` is no longer used in runtime code; use `app.isPackaged`/process checks.
- Sentry uses protocol IPC mode.
- Electron builder pack check uses `electron-builder.pack-check.cjs`.

## Electron Warning Cleanup

Circular dependency warning fixed by removing `mainWindow` export/import patterns. IPC modules use Electron APIs directly:

```js
BrowserWindow.fromWebContents(event.sender)
```

Sentry preload deprecation warnings were addressed by using protocol IPC mode:

```js
ipcMode: Sentry.IPCMode.Protocol
```

DevTools behavior:

- Development opens DevTools by default again.
- Use `ELECTRON_OPEN_DEVTOOLS=0` to suppress.
- React DevTools extension install remains opt-in.

## Pack Check Safety

User specifically requested pack checks without publishing.

`package.json`:

```json
"pack": "electron-builder --dir --publish never --config electron-builder.pack-check.cjs"
```

`electron-builder.pack-check.cjs` disables Azure signing options for this local check. Do not remove `--publish never` from the pack script.

