Skip to content

Fix missing annotator row initialization on initial load#75

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/fix-initial-load-warning
Draft

Fix missing annotator row initialization on initial load#75
Copilot wants to merge 3 commits intomainfrom
copilot/fix-initial-load-warning

Conversation

Copy link

Copilot AI commented Nov 20, 2025

On initial load without URL parameters, the app displays "No annotator rows selected" warning and requires manually clicking "Run analysis" to proceed.

Changes

src/feedback_forensics/app/callbacks/loading.py

  • Moved config is None branch after app_url initialization to ensure base URL is set
  • When config is None and default dataset exists:
    • Call update_config_on_dataset_change() to populate default annotator rows from available principle annotators
    • Extract Gradio component values into data dict so load_data() can access them
    • Call load_data() to auto-load with defaults instead of showing empty state

Previously:

if config is None:
    return {
        inp["active_datasets_dropdown"]: gr.Dropdown(value=default_datasets[0])
    }

Now:

if config is None:
    # ... set dataset and app_url
    base_updated_config_dict = update_config_on_dataset_change(data)
    for key, component in base_updated_config_dict.items():
        if hasattr(component, "value"):
            data[key] = component.value
    return_dict = {**return_dict, **load_data(data)}

This aligns initial load behavior with URL-parameterized loads, both of which now populate defaults before rendering.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • api.gradio.app
    • Triggering command: python -m feedback_forensics.app.main -d data/output/annotated_pairs.json (dns block)
    • Triggering command: /usr/bin/python -m feedback_forensics.app.main -d data/output/annotated_pairs.json (dns block)
    • Triggering command: python -m feedback_forensics.app.main --datapath data/output/example/results/070_annotations_train_ap.json (dns block)
  • huggingface.co
    • Triggering command: python -m feedback_forensics.app.main -d data/output/annotated_pairs.json (dns block)
    • Triggering command: /usr/bin/python -m feedback_forensics.app.main -d data/output/annotated_pairs.json (dns block)
    • Triggering command: python -m feedback_forensics.app.main --datapath data/output/example/results/070_annotations_train_ap.json (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Issue with initial load of app</issue_title>
<issue_description>Initially the online app currently shows

Warning
No annotator rows selected. Please select at least one annotator row to run analysis on.

This can be quickly fixed by pressing "Run analysis" but really should never show up.</issue_description>

<agent_instructions>It appears the annotator row selection is incorrect, perhaps it is not correctly initialized?</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits November 20, 2025 16:40
Co-authored-by: rdnfn <75615911+rdnfn@users.noreply.github.com>
Co-authored-by: rdnfn <75615911+rdnfn@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix initial load warning in online app Fix missing annotator row initialization on initial load Nov 20, 2025
Copilot AI requested a review from rdnfn November 20, 2025 16:47
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.

Issue with initial load of app

2 participants