Skip to content

feat!: introduce more field input types to HumanInputNode#55

Merged
WH-2099 merged 34 commits into
langgenius:mainfrom
QuantumGhost:QuantumGhost/hitl-form-dsl
May 13, 2026
Merged

feat!: introduce more field input types to HumanInputNode#55
WH-2099 merged 34 commits into
langgenius:mainfrom
QuantumGhost:QuantumGhost/hitl-form-dsl

Conversation

@QuantumGhost
Copy link
Copy Markdown
Contributor

@QuantumGhost QuantumGhost commented Apr 20, 2026

BREAKING CHANGE: rename multiple existing classes and remove unused enumeration members

Related Issue

Closes #54

Summary

  • Introduce the following three form types:
    • SELECT
    • FILE
    • FILE_LIST
  • Rename FormInput to ParagraphInput
  • Rename FormInputDefault to StringSource
  • Remove unused FormInputType.TEXT_INPUT enumeration member
  • Add some tests to ensure previously persisted human input form could be deserialized
  • Remove unused VariablePool.get_all_by_node method
  • Minor adjustments to coding styles and lint rules
    • Introduce .editorconfig file
    • Ignore PLC1901 in test files, since I believe it makes assertions more obscure
    • Add static type assertions for ReadOnlyVariablePool implementations

Checklist

  • This pull request links the issue it resolves or advances
  • This pull request title follows Conventional Commits, and any breaking change is marked with !
  • If CLA Assistant prompted me, I signed CLA.md in the pull request conversation

The following input field types are added:

- `SELECT`: for single select fields
- `FILE`: for file field that accepts a single file
- `FILE_LIST`: for file input fields that accepts zero or more files.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 20, 2026

All contributors on this pull request have signed the CLA.
Posted by the CLA Assistant Lite bot.

Change the `FormInput` to `ParagraphInput` to clarify that
this is only the input defition for `PRRAGRAPH` input field type.

Rename `FormInputDefault` to `StringSource` to indicate that this is
the source configuration for a string field in form.

BREAKING CHANGE: `FormInput` and `FormInputDefault` renamed
Since this field is used both for form default values and
select option sources, `PlaceholderType` is not a accurate name
for it.

BREAKING CHANGE: PlaceholderType renamed.
The frontend code only utilizes the `PARAGRAPH` input type now. Drop
`TEXT_INPUT` to avoid extra maintenance burden.

BREAKING CHANGE: `FormInputType.TEXT_INPUT` removed
@QuantumGhost QuantumGhost force-pushed the QuantumGhost/hitl-form-dsl branch from e0685a4 to 88a8e91 Compare April 20, 2026 01:37
@QuantumGhost
Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

The following new input field types are added:

- select
- file
- file-list
Use PLC1901 in tests making tests more obscure. For example, it is clear
that the following code assert x should be an empty string.

```py
assert x == ""
```

However, `PLC1901` prohibits comparison to empty string and advocates
the following code:

```py
assert not x
```

The later is less clear as we cannot see what's the property tests are
asserting from a glimpse. Instead, we must taking the type of `x` into
account while reading test code. It makes reading tests harder.

Documentation Link: https://docs.astral.sh/ruff/rules/compare-to-empty-string/
@QuantumGhost QuantumGhost force-pushed the QuantumGhost/hitl-form-dsl branch from 88a8e91 to f445e74 Compare April 20, 2026 01:45
@QuantumGhost QuantumGhost marked this pull request as ready for review April 20, 2026 01:50
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Apr 20, 2026
@QuantumGhost QuantumGhost marked this pull request as draft April 20, 2026 02:39
@QuantumGhost QuantumGhost changed the title feat: introduce more field input types to HumanInputNode feat!: introduce more field input types to HumanInputNode Apr 20, 2026
Comment thread src/graphon/nodes/human_input/enums.py Outdated
@QuantumGhost QuantumGhost marked this pull request as ready for review May 12, 2026 07:07
@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels May 12, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 13, 2026
@WH-2099 WH-2099 merged commit a1c8f4b into langgenius:main May 13, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: Add new form input types to HumanInputNode

3 participants