Skip to content

Sync: develop into staging (Data control, biochem, subsystems, structures)#178

Merged
VibhavSetlur merged 1 commit intoModelSEED:stagingfrom
VibhavSetlur:staging
May 4, 2026
Merged

Sync: develop into staging (Data control, biochem, subsystems, structures)#178
VibhavSetlur merged 1 commit intoModelSEED:stagingfrom
VibhavSetlur:staging

Conversation

@VibhavSetlur
Copy link
Copy Markdown
Collaborator

Merges latest develop work into staging for upstream review.

Includes: DataControlHeader hardening, biochem compounds/reactions fixes, subsystems reaction links, compound/reaction structure placeholders, tests/docs.

Fork staging matches local develop; pushed to origin/staging.

Made with Cursor

Copilot AI review requested due to automatic review settings May 4, 2026 22:30
@VibhavSetlur VibhavSetlur merged commit e09bf6c into ModelSEED:staging May 4, 2026
2 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR syncs develop into staging, focusing on UI hardening and data correctness across pages that consume Workspace / ModelSEED APIs (notably timestamp parsing, DataGrid behavior, and model/FBA/media link/data fields).

Changes:

  • Added a shared parseWorkspaceDate utility and updated multiple DataGrid dateTime columns to correctly parse Workspace timestamps like YYYY-MM-DD-HH:MM:SS.
  • Hardened DataControlHeader pagination by hiding it while grid rows are loading to avoid a transient “0-0 of 0” display.
  • Simplified listMyMediaFromApi to only use the /api/media/mine endpoint, and adjusted model detail rendering to prefer media_ref plus some ref/link handling.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
lib/utils/date.ts Introduces parseWorkspaceDate helper for normalizing Workspace timestamp strings into parseable ISO-like form.
lib/api/modelseed.ts Simplifies listMyMediaFromApi behavior to a single endpoint call (removes prior fallback path scanning).
components/layout/DataControlHeader.tsx Hides custom pagination while DataGrid is loading to prevent pagination flashing incorrect totals.
app/model/[...path]/page.tsx Uses parseWorkspaceDate for timestamps, prefers media_ref, adjusts model edits query key/candidate, and improves FBA link ref handling.
app/fba/[...path]/page.tsx Normalizes Workspace ls timestamps before sorting FBA refs by time.
app/data/[...path]/page.tsx Preserves raw Workspace timestamps and parses them via parseWorkspaceDate for the “Modified” column.
app/(user-data)/myMedia/page.tsx Parses media modification dates with parseWorkspaceDate for correct DataGrid dateTime handling.
app/(user-data)/my-models/page.tsx Parses model modification dates with parseWorkspaceDate for correct DataGrid dateTime handling.

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

Comment on lines +195 to 199
const rawTs = String(entry[3] ?? '');
const normalizedTs = rawTs.replace(/^(\d{4}-\d{2}-\d{2})-(\d{2}:\d{2}:\d{2})$/, '$1T$2');
const ts = Number.isFinite(new Date(normalizedTs).getTime())
? new Date(normalizedTs).getTime()
: 0;
Comment thread lib/api/modelseed.ts
Comment on lines 625 to 629
* ```
*/
export async function listMyMediaFromApi(): Promise<ModelseedMediaSummary[]> {
const primary = await listMediaGeneric('/api/media/mine');
if (primary.length > 0) return primary;

if (!USE_NEW_PROXY) return primary;
const username = getStoredAuthUsername();
if (!username) return primary;

try {
const fallbackPaths = [
`/${username}/media`,
`/${username}/modelseed/media`,
];
for (const path of fallbackPaths) {
const viaWorkspace = await listMediaViaWorkspaceLs(path);
if (viaWorkspace.length > 0) return viaWorkspace;
}
return primary;
} catch (err) {
console.warn('modelseed-api: fallback /api/workspace/ls media lookup failed:', err);
return primary;
}
return listMediaGeneric('/api/media/mine');
}
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