fix: Disable actions on autogenerated docs/nodes#2766
Conversation
…en diffing in/out folders WHY: Ensures that the test diffing works correctly and the __pycache__ folder does not get in the way. HOW: Extracted from #2766.
a94276b to
e64b441
Compare
e64b441 to
5c7e974
Compare
| form_field_index | ||
| ] | ||
|
|
||
| if hasattr(old_field, "origin"): |
There was a problem hiding this comment.
The PR had a few instances of this. @thseiler I am curious if this is produced by an AI tool. Which tool did you possibly use to create it? I would be curious if we could extend our Dev Guide and let all AI tools avoid creating this pattern in the future.
(I have been using Codex until now and haven't seen this pattern from it)
|
|
||
| return self.get_prefix() | ||
|
|
||
| def is_managed_by_source_code(self) -> bool: |
There was a problem hiding this comment.
@thseiler I started rebasing your branch and it needed a few changes that led me to editing your commit directly instead of push an additional code review one. The summary of my changes:
- I removed ActionPolicy class. Instead I moved most methods to the DocumentScreenViewObject and here as
is_managed_by_source_code. One pattern here I tried to avoid is to add global logic to Jinja templates as that contradicts to the currently adopted pattern of routing everything through theview objectobjects. - I did a minor clean up of the new e2e test fixtures, removing some of the unneeded files.
I am still reviewing the impact and consistency of your other changes, expecially the file_traceability_index. and update_requirement.py. Should be done by the end of this weekend.
There was a problem hiding this comment.
Also, @mettta will review the CSS styles to ensure that this change is consistent with everything else.
WHAT:
While working on the image PR, I noticed that it was possible to edit certain node types that StrictDoc cannot currently save:
These changes appear to take effect initially (as the in-memory model is updated), but they are lost when the server is stopped.
WHY:
Ensures that the user notices that he can currently not edit these node types.
HOW:
The PR introduces an ActionPolicy object and hooks it:
Points for Discussion: